diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2013-06-12 09:50:04 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2013-06-12 12:50:55 +0400 |
commit | ca89b8c4820836daecb2b1ab4431808721d33f1f (patch) | |
tree | 0a60424e4b5484f2c11ef7938ad3f20a51097377 | |
parent | e1243339b15b8dea971bce51d1362ee8024771ee (diff) | |
download | bdwgc-ca89b8c4820836daecb2b1ab4431808721d33f1f.tar.gz |
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).
-rw-r--r-- | mark_rts.c | 9 | ||||
-rw-r--r-- | os_dep.c | 3 |
2 files changed, 8 insertions, 4 deletions
@@ -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; @@ -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) { |