aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2014-04-25 21:34:29 +0100
committerMelanie2014-04-25 21:34:29 +0100
commita108fcac957dd2283fb8904207addda6dc7582f0 (patch)
tree9ac4b3fb57273ae32f67c8c9878adb74d9fc8593 /OpenSim/Framework
parentAdjust permissions to work hand in hand with what the viewer believes they are. (diff)
downloadopensim-SC_OLD-a108fcac957dd2283fb8904207addda6dc7582f0.zip
opensim-SC_OLD-a108fcac957dd2283fb8904207addda6dc7582f0.tar.gz
opensim-SC_OLD-a108fcac957dd2283fb8904207addda6dc7582f0.tar.bz2
opensim-SC_OLD-a108fcac957dd2283fb8904207addda6dc7582f0.tar.xz
Restore overload mode accidentally disabled in a prior commit. Add a new
config option, LogOverloads, to log when a thread pool overload occurs. This option defaults to "True" because the logging data is useful for diagnosing threading issues.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index c8a0c68..740e55a 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -127,12 +127,14 @@ namespace OpenSim.Framework
127 /// 3 = full stack trace, including common threads 127 /// 3 = full stack trace, including common threads
128 /// </summary> 128 /// </summary>
129 public static int LogThreadPool { get; set; } 129 public static int LogThreadPool { get; set; }
130 public static bool LogOverloads { get; set; }
130 131
131 public static readonly int MAX_THREADPOOL_LEVEL = 3; 132 public static readonly int MAX_THREADPOOL_LEVEL = 3;
132 133
133 static Util() 134 static Util()
134 { 135 {
135 LogThreadPool = 0; 136 LogThreadPool = 0;
137 LogOverloads = true;
136 } 138 }
137 139
138 private static uint nextXferID = 5000; 140 private static uint nextXferID = 5000;
@@ -2172,7 +2174,7 @@ namespace OpenSim.Framework
2172 { 2174 {
2173 long numRunning = numRunningThreadFuncs; 2175 long numRunning = numRunningThreadFuncs;
2174 2176
2175 if (m_ThreadPool != null) 2177 if (m_ThreadPool != null && LogOverloads)
2176 { 2178 {
2177 if ((threadFuncOverloadMode == 0) && (numRunning >= m_ThreadPool.MaxThreads)) 2179 if ((threadFuncOverloadMode == 0) && (numRunning >= m_ThreadPool.MaxThreads))
2178 { 2180 {
@@ -2193,7 +2195,7 @@ namespace OpenSim.Framework
2193 threadInfo.StackTrace = full; 2195 threadInfo.StackTrace = full;
2194 threadInfo.LogThread = ShouldLogThread(partial); 2196 threadInfo.LogThread = ShouldLogThread(partial);
2195 2197
2196 if (loggingEnabled && threadInfo.LogThread) 2198 if (threadInfo.LogThread)
2197 { 2199 {
2198 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}{4}", 2200 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}{4}",
2199 threadFuncNum, numQueued, numRunningThreadFuncs, 2201 threadFuncNum, numQueued, numRunningThreadFuncs,