From: Ivan Maidanski Date: Wed, 12 Jun 2013 05:50:04 +0000 (+0400) Subject: Improve debug-only messages of add/remove_roots and init_linux_data_start X-Git-Tag: gc7_4_0~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca89b8c4820836daecb2b1ab4431808721d33f1f;p=gc Improve debug-only messages of add/remove_roots and init_linux_data_start * mark_rts.c (GC_add_roots_inner, GC_remove_root_at_pos): Log r_tmp value (only if DEBUG_ADD_DEL_ROOTS). * os_dep.c (GC_init_linux_data_start): Log unresolved [__]data_start symbol (only if DEBUG_ADD_DEL_ROOTS and LINUX). --- diff --git a/mark_rts.c b/mark_rts.c index 7ffe82a6..a8dc04a2 100644 --- a/mark_rts.c +++ b/mark_rts.c @@ -246,8 +246,8 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp) } # ifdef DEBUG_ADD_DEL_ROOTS - GC_log_printf("Adding data root section %d: %p .. %p\n", - n_root_sets, b, e); + GC_log_printf("Adding data root section %d: %p .. %p%s\n", + n_root_sets, b, e, tmp ? " (temporary)" : ""); # endif GC_static_roots[n_root_sets].r_start = (ptr_t)b; GC_static_roots[n_root_sets].r_end = (ptr_t)e; @@ -284,8 +284,9 @@ GC_API void GC_CALL GC_clear_roots(void) STATIC void GC_remove_root_at_pos(int i) { # ifdef DEBUG_ADD_DEL_ROOTS - GC_log_printf("Remove data root section %d: %p .. %p\n", - i, GC_static_roots[i].r_start, GC_static_roots[i].r_end); + GC_log_printf("Remove data root section at %d: %p .. %p%s\n", + i, GC_static_roots[i].r_start, GC_static_roots[i].r_end, + GC_static_roots[i].r_tmp ? " (temporary)" : ""); # endif GC_root_size -= (GC_static_roots[i].r_end - GC_static_roots[i].r_start); GC_static_roots[i].r_start = GC_static_roots[n_root_sets-1].r_start; diff --git a/os_dep.c b/os_dep.c index f835eaf7..388bc4a4 100644 --- a/os_dep.c +++ b/os_dep.c @@ -467,6 +467,9 @@ GC_INNER char * GC_get_maps(void) GC_ASSERT((word)GC_data_start <= (word)_end); return; } +# ifdef DEBUG_ADD_DEL_ROOTS + GC_log_printf("__data_start not provided\n"); +# endif # endif /* LINUX */ if (GC_no_dls) {