From: Ivan Maidanski Date: Tue, 11 Dec 2012 04:05:42 +0000 (+0400) Subject: Enable on-demand debug logging in GC_FindTopOfStack (Darwin) X-Git-Tag: gc7_4_0~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08f59f7e9daa9c0d030b4611c23a44308e1f6426;p=gc Enable on-demand debug logging in GC_FindTopOfStack (Darwin) * darwin_stop_world.c (GC_FindTopOfStack): Test DEBUG_THREADS_EXTRA instead of DEBUG_THREADS; uncomment GC_log_printf calls inside DEBUG_THREADS_EXTRA. --- diff --git a/darwin_stop_world.c b/darwin_stop_world.c index a63d64e5..11813d2e 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -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; }