From 35a8784236b959e821bf06cbc0a0a1fb6a451e1e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 9 Jul 2018 17:56:36 -0400 Subject: [PATCH] Add diagnostics --- gc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gc.c b/gc.c index 3be18818..910b425c 100644 --- a/gc.c +++ b/gc.c @@ -1483,6 +1483,17 @@ void gc_collector_sweep() CK_ARRAY_FOREACH(&Cyc_mutators, &iterator, &m) { +// DEBUG diagnostics +#if GC_DEBUG_SHOW_SWEEP_DIAG + for (heap_type = 0; heap_type < NUM_HEAP_TYPES; heap_type++) { + h = m->heap->heap[heap_type]; + if (h) { + fprintf(stderr, "From collector - Heap %d diagnostics:\n", heap_type); + gc_print_stats(h); + } + } +#endif + // TODO: what to update in each heap? probably want to reset back to first heap in each mutator // may also need to set other things, clear color?