diff options
author | BlueWall | 2014-09-17 18:11:41 -0400 |
---|---|---|
committer | BlueWall | 2014-09-17 18:11:41 -0400 |
commit | 376fab140227e92dbd841436509a97b87c9e7792 (patch) | |
tree | f9c7151984ed47ad8eac25a72f7bac3fa6ea22ae /OpenSim | |
parent | Small changes to threading to send thread names to unmanaged threads. Needs M... (diff) | |
download | opensim-SC-376fab140227e92dbd841436509a97b87c9e7792.zip opensim-SC-376fab140227e92dbd841436509a97b87c9e7792.tar.gz opensim-SC-376fab140227e92dbd841436509a97b87c9e7792.tar.bz2 opensim-SC-376fab140227e92dbd841436509a97b87c9e7792.tar.xz |
Revert "Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects."
This reverts commit af286d5fcb688e8b64202b6deca4f249e9a2b6b8.
Issue with Jenkins builds
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Monitoring/Watchdog.cs | 13 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/OSHttpRequestPump.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/OSHttpServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 |
4 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index e9f22f1..e9e7bd2 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring | |||
87 | /// </summary> | 87 | /// </summary> |
88 | public Stat Stat { get; set; } | 88 | public Stat Stat { get; set; } |
89 | 89 | ||
90 | public ThreadWatchdogInfo(Thread thread, int timeout, string name) | 90 | public ThreadWatchdogInfo(Thread thread, int timeout) |
91 | { | 91 | { |
92 | Thread = thread; | 92 | Thread = thread; |
93 | Timeout = timeout; | 93 | Timeout = timeout; |
@@ -96,8 +96,8 @@ namespace OpenSim.Framework.Monitoring | |||
96 | 96 | ||
97 | Stat | 97 | Stat |
98 | = new Stat( | 98 | = new Stat( |
99 | name, | 99 | thread.Name, |
100 | string.Format("Last update of thread {0}", name), | 100 | string.Format("Last update of thread {0}", thread.Name), |
101 | "", | 101 | "", |
102 | "ms", | 102 | "ms", |
103 | "server", | 103 | "server", |
@@ -216,11 +216,12 @@ namespace OpenSim.Framework.Monitoring | |||
216 | bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true) | 216 | bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true) |
217 | { | 217 | { |
218 | Thread thread = new Thread(start); | 218 | Thread thread = new Thread(start); |
219 | thread.Name = name; | ||
219 | thread.Priority = priority; | 220 | thread.Priority = priority; |
220 | thread.IsBackground = isBackground; | 221 | thread.IsBackground = isBackground; |
221 | 222 | ||
222 | ThreadWatchdogInfo twi | 223 | ThreadWatchdogInfo twi |
223 | = new ThreadWatchdogInfo(thread, timeout, name) | 224 | = new ThreadWatchdogInfo(thread, timeout) |
224 | { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; | 225 | { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; |
225 | 226 | ||
226 | if (log) | 227 | if (log) |
@@ -229,10 +230,8 @@ namespace OpenSim.Framework.Monitoring | |||
229 | 230 | ||
230 | lock (m_threads) | 231 | lock (m_threads) |
231 | m_threads.Add(twi.Thread.ManagedThreadId, twi); | 232 | m_threads.Add(twi.Thread.ManagedThreadId, twi); |
232 | |||
233 | thread.Start(); | ||
234 | thread.Name = name; | ||
235 | 233 | ||
234 | thread.Start(); | ||
236 | 235 | ||
237 | return thread; | 236 | return thread; |
238 | } | 237 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequestPump.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequestPump.cs index bdea278..77cfb7e 100644 --- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequestPump.cs +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequestPump.cs | |||
@@ -70,9 +70,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
70 | _id = id; | 70 | _id = id; |
71 | 71 | ||
72 | _engine = new Thread(new ThreadStart(Engine)); | 72 | _engine = new Thread(new ThreadStart(Engine)); |
73 | _engine.Name = EngineID; | ||
73 | _engine.IsBackground = true; | 74 | _engine.IsBackground = true; |
74 | _engine.Start(); | 75 | _engine.Start(); |
75 | _engine.Name = string.Format ("Engine:{0}",EngineID); | ||
76 | 76 | ||
77 | ThreadTracker.Add(_engine); | 77 | ThreadTracker.Add(_engine); |
78 | } | 78 | } |
@@ -91,9 +91,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
91 | public void Start() | 91 | public void Start() |
92 | { | 92 | { |
93 | _engine = new Thread(new ThreadStart(Engine)); | 93 | _engine = new Thread(new ThreadStart(Engine)); |
94 | _engine.Name = EngineID; | ||
94 | _engine.IsBackground = true; | 95 | _engine.IsBackground = true; |
95 | _engine.Start(); | 96 | _engine.Start(); |
96 | _engine.Name = string.Format ("Engine:{0}",EngineID); | ||
97 | 97 | ||
98 | ThreadTracker.Add(_engine); | 98 | ThreadTracker.Add(_engine); |
99 | } | 99 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpServer.cs index cd62842..84aa31b 100644 --- a/OpenSim/Framework/Servers/HttpServer/OSHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpServer.cs | |||
@@ -150,9 +150,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
150 | public void Start() | 150 | public void Start() |
151 | { | 151 | { |
152 | _engine = new Thread(new ThreadStart(Engine)); | 152 | _engine = new Thread(new ThreadStart(Engine)); |
153 | _engine.Name = _engineId; | ||
153 | _engine.IsBackground = true; | 154 | _engine.IsBackground = true; |
154 | _engine.Start(); | 155 | _engine.Start(); |
155 | _engine.Name = string.Format ("Engine:{0}",_engineId); | ||
156 | 156 | ||
157 | ThreadTracker.Add(_engine); | 157 | ThreadTracker.Add(_engine); |
158 | 158 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7e4d9ed..28dbccb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1079,8 +1079,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1079 | StatsReporter = new SimStatsReporter(this); | 1079 | StatsReporter = new SimStatsReporter(this); |
1080 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 1080 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
1081 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 1081 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
1082 | |||
1083 | Thread.CurrentThread.Name = string.Format ("Scene:{0}", regInfo.RegionName.Replace(" ", "_")); | ||
1084 | } | 1082 | } |
1085 | 1083 | ||
1086 | public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo) | 1084 | public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo) |
@@ -1398,7 +1396,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1398 | 1396 | ||
1399 | m_heartbeatThread | 1397 | m_heartbeatThread |
1400 | = Watchdog.StartThread( | 1398 | = Watchdog.StartThread( |
1401 | Heartbeat, string.Format("Heartbeat-({0})", RegionInfo.RegionName.Replace(" ", "_")), ThreadPriority.Normal, false, false); | 1399 | Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); |
1402 | 1400 | ||
1403 | StartScripts(); | 1401 | StartScripts(); |
1404 | } | 1402 | } |