Merge pull request #2734 from nealef/master
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Mon, 6 Jun 2016 16:00:47 +0000 (12:00 -0400)
committerAleksey Kliger (λgeek) <akliger@gmail.com>
Mon, 6 Jun 2016 16:00:47 +0000 (12:00 -0400)
Enhance log tracing

1  2 
man/mono.1
mono/sgen/sgen-gc.h
mono/utils/mono-threads.c

diff --cc man/mono.1
Simple merge
Simple merge
index a92d250b290448698ece831e6809b4c99a8f3cdd,3d479a07fe12a502ff5563410fd79ea5e83a1f31..03c0aca8ddf3f749a801d1319ba4fa76585691b5
@@@ -655,11 -637,20 +659,20 @@@ mono_threads_init (MonoThreadInfoCallba
        g_assert (res);
  
        unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled ();
+       
+       if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) {
+               long threshold = strtol(sleepLimit, NULL, 10);
+               if ((errno == 0) && (threshold >= 40))  {
+                       sleepAbortDuration = threshold;
+                       sleepWarnDuration = threshold / 20;
+               } else
+                       g_warning("MONO_SLEEP_ABORT_LIMIT must be a number >= 40");
+       }
  
 -      mono_coop_sem_init (&global_suspend_semaphore, 1);
 +      mono_os_sem_init (&global_suspend_semaphore, 1);
        mono_os_sem_init (&suspend_semaphore, 0);
  
 -      mono_lls_init (&thread_list, NULL);
 +      mono_lls_init (&thread_list, NULL, HAZARD_FREE_NO_LOCK);
        mono_thread_smr_init ();
        mono_threads_init_platform ();
        mono_threads_init_coop ();