]> granicus.if.org Git - gc/commitdiff
Improve debug-only messages of add/remove_roots and init_linux_data_start
authorIvan Maidanski <ivmai@mail.ru>
Wed, 12 Jun 2013 05:50:04 +0000 (09:50 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 12 Jun 2013 08:50:55 +0000 (12:50 +0400)
* 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).

mark_rts.c
os_dep.c

index 7ffe82a6df1bd64d416459576f63b459b05c85af..a8dc04a2b7e886aa9272ae936faf8796740fc915 100644 (file)
@@ -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;
index f835eaf750d65cde7935cd58d16f581276df69fd..388bc4a4d181b6f55809cf7a7eb96b5fe54d0659 100644 (file)
--- 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) {