summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-06-12 07:50:04 +0200
committerIvan Maidanski <ivmai@mail.ru>2013-06-12 10:50:55 +0200
commitca89b8c4820836daecb2b1ab4431808721d33f1f (patch)
tree0a60424e4b5484f2c11ef7938ad3f20a51097377
parente1243339b15b8dea971bce51d1362ee8024771ee (diff)
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.c9
-rw-r--r--os_dep.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 7ffe82a..a8dc04a 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 f835eaf..388bc4a 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) {