]> granicus.if.org Git - gc/commitdiff
Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 11 Dec 2012 04:05:42 +0000 (08:05 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 11 Dec 2012 10:06:01 +0000 (14:06 +0400)
* darwin_stop_world.c (GC_FindTopOfStack): Test DEBUG_THREADS_EXTRA
instead of DEBUG_THREADS; uncomment GC_log_printf calls inside
DEBUG_THREADS_EXTRA.

darwin_stop_world.c

index a63d64e574d42a8dc8b71642f3dd960b3e58a597..11813d2e90b3af233dbab864385063272ca50e13 100644 (file)
@@ -68,8 +68,8 @@ GC_INNER ptr_t GC_FindTopOfStack(unsigned long stack_start)
     frame = (StackFrame *)stack_start;
   }
 
-# ifdef DEBUG_THREADS
-    /* GC_log_printf("FindTopOfStack start at sp = %p\n", frame); */
+# ifdef DEBUG_THREADS_EXTRA
+    GC_log_printf("FindTopOfStack start at sp = %p\n", frame);
 # endif
   while (frame->savedSP != 0) {
     /* if there are no more stack frames, stop */
@@ -82,8 +82,8 @@ GC_INNER ptr_t GC_FindTopOfStack(unsigned long stack_start)
     if ((frame->savedLR & ~0x3) == 0 || (frame->savedLR & ~0x3) == ~0x3U)
       break; /* if the next LR is bogus, stop */
   }
-# ifdef DEBUG_THREADS
-    /* GC_log_printf("FindTopOfStack finish at sp = %p\n", frame); */
+# ifdef DEBUG_THREADS_EXTRA
+    GC_log_printf("FindTopOfStack finish at sp = %p\n", frame);
 # endif
   return (ptr_t)frame;
 }