aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorOren Hurvitz2013-12-19 10:51:10 +0200
committerOren Hurvitz2014-03-25 08:01:41 +0100
commite735f765539dc2f9a6b5d072b114a5b0116dba9f (patch)
treea1a431d6d2e651fffd7799aa2e02ee589aa39087
parentRefactored DebugFlagsEnum (diff)
downloadopensim-SC_OLD-e735f765539dc2f9a6b5d072b114a5b0116dba9f.zip
opensim-SC_OLD-e735f765539dc2f9a6b5d072b114a5b0116dba9f.tar.gz
opensim-SC_OLD-e735f765539dc2f9a6b5d072b114a5b0116dba9f.tar.bz2
opensim-SC_OLD-e735f765539dc2f9a6b5d072b114a5b0116dba9f.tar.xz
LogThreadPool: when the thread is for ProcessPacketMethod, also log the packet type
Resolves http://opensimulator.org/mantis/view.php?id=6945
-rw-r--r--OpenSim/Framework/Util.cs15
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
2 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 225d360..6be1722 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1864,7 +1864,7 @@ namespace OpenSim.Framework
1864 1864
1865 public static void FireAndForget(System.Threading.WaitCallback callback) 1865 public static void FireAndForget(System.Threading.WaitCallback callback)
1866 { 1866 {
1867 FireAndForget(callback, null); 1867 FireAndForget(callback, null, null);
1868 } 1868 }
1869 1869
1870 public static void InitThreadPool(int minThreads, int maxThreads) 1870 public static void InitThreadPool(int minThreads, int maxThreads)
@@ -1914,6 +1914,11 @@ namespace OpenSim.Framework
1914 1914
1915 public static void FireAndForget(System.Threading.WaitCallback callback, object obj) 1915 public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
1916 { 1916 {
1917 FireAndForget(callback, obj, null);
1918 }
1919
1920 public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context)
1921 {
1917 WaitCallback realCallback; 1922 WaitCallback realCallback;
1918 1923
1919 bool loggingEnabled = (DebugFlags & DebugFlagsEnum.LogThreadPool) != 0; 1924 bool loggingEnabled = (DebugFlags & DebugFlagsEnum.LogThreadPool) != 0;
@@ -1973,8 +1978,12 @@ namespace OpenSim.Framework
1973 } 1978 }
1974 1979
1975 if (loggingEnabled || (threadFuncOverloadMode == 1)) 1980 if (loggingEnabled || (threadFuncOverloadMode == 1))
1976 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}", 1981 {
1977 threadFuncNum, numQueued, numRunningThreadFuncs, GetFireAndForgetStackTrace(loggingEnabled)); 1982 m_log.DebugFormat("Queue threadfunc {0} (Queued {1}, Running {2}) {3}{4}",
1983 threadFuncNum, numQueued, numRunningThreadFuncs,
1984 (context == null) ? "" : ("(" + context + ") "),
1985 GetFireAndForgetStackTrace(loggingEnabled));
1986 }
1978 1987
1979 switch (FireAndForgetMethod) 1988 switch (FireAndForgetMethod)
1980 { 1989 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 86161c9..d9fe4e2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -694,7 +694,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
694 cinfo.AsyncRequests[packet.Type.ToString()]++; 694 cinfo.AsyncRequests[packet.Type.ToString()]++;
695 695
696 object obj = new AsyncPacketProcess(this, pprocessor.method, packet); 696 object obj = new AsyncPacketProcess(this, pprocessor.method, packet);
697 Util.FireAndForget(ProcessSpecificPacketAsync, obj); 697 Util.FireAndForget(ProcessSpecificPacketAsync, obj, packet.Type.ToString());
698 result = true; 698 result = true;
699 } 699 }
700 else 700 else