diff --git a/gc.c b/gc.c index 84006494..38dcde1a 100644 --- a/gc.c +++ b/gc.c @@ -858,8 +858,10 @@ void gc_mut_cooperate(gc_thread_data *thd) } else if (thd->gc_status == STATUS_SYNC2) { // Mark thread "roots" +printf("gc_cont %p\n", thd->gc_cont); gc_mark_gray(thd, thd->gc_cont); for (i = 0; i < thd->gc_num_args; i++) { +printf("gc_args[%d] %p\n", i, thd->gc_args[i]); gc_mark_gray(thd, thd->gc_args[i]); } thd->gc_alloc_color = ATOMIC_GET(&gc_color_mark); @@ -1016,7 +1018,7 @@ void gc_collector_mark_gray(object parent, object obj) // could lead to stack corruption. if (is_object_type(obj) && mark(obj) == gc_color_clear) { mark_stack = vpbuffer_add(mark_stack, &mark_stack_len, mark_stack_i++, obj); -printf("mark gray parent = %p obj = %p\n", parent, obj); +printf("mark gray parent = %p (%ld) obj = %p\n", parent, type_of(parent), obj); } } diff --git a/runtime.c b/runtime.c index da652d1e..9114ec66 100644 --- a/runtime.c +++ b/runtime.c @@ -2441,6 +2441,7 @@ void gc_mark_globals() printf("(gc_mark_globals heap: %p size: %d)\n", h, (unsigned int)gc_heap_total_size(h)); #endif // Mark global variables +printf("Cyc_global_variables %p\n"); gc_mark_black(Cyc_global_variables); // Internal global used by the runtime // Marking it ensures all glos are marked { @@ -2449,6 +2450,7 @@ void gc_mark_globals() cvar_type *c = (cvar_type *)car(l); object glo = *(c->pvar); if (!nullp(glo)) { +printf("global pvar %p\n", glo); gc_mark_black(glo); // Mark actual object the global points to } }