mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-05 20:26:35 +02:00
Add diagnostics
This commit is contained in:
parent
0df28b5ddc
commit
35a8784236
1 changed files with 11 additions and 0 deletions
11
gc.c
11
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?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue