From af286d5fcb688e8b64202b6deca4f249e9a2b6b8 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 17 Sep 2014 17:56:10 -0400 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 28dbccb..7e4d9ed 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1079,6 +1079,8 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter = new SimStatsReporter(this); StatsReporter.OnSendStatsResult += SendSimStatsPackets; StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; + + Thread.CurrentThread.Name = string.Format ("Scene:{0}", regInfo.RegionName.Replace(" ", "_")); } public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo) @@ -1396,7 +1398,7 @@ namespace OpenSim.Region.Framework.Scenes m_heartbeatThread = Watchdog.StartThread( - Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); + Heartbeat, string.Format("Heartbeat-({0})", RegionInfo.RegionName.Replace(" ", "_")), ThreadPriority.Normal, false, false); StartScripts(); } -- cgit v1.1