mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 11:46:35 +02:00
Added more GC trace logging
This commit is contained in:
parent
81a3cf9c2f
commit
d051b81d80
1 changed files with 12 additions and 0 deletions
12
gc.c
12
gc.c
|
@ -1177,6 +1177,9 @@ hrt_log_delta("gc sweep", tstamp);
|
|||
#endif
|
||||
h_passed->num_unswept_children--;
|
||||
if (!keep) {
|
||||
#if GC_DEBUG_TRACE
|
||||
fprintf(stderr, "heap %p marked for deletion\n", h);
|
||||
#endif
|
||||
// Heap marked for deletion, remove it and keep searching
|
||||
gc_heap *freed = gc_heap_free(h, h_prev);
|
||||
if (freed) {
|
||||
|
@ -1213,6 +1216,9 @@ hrt_log_delta("gc sweep", tstamp);
|
|||
} else {
|
||||
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
||||
h->is_full = 1;
|
||||
#if GC_DEBUG_TRACE
|
||||
fprintf(stderr, "heap %p is full\n", h);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1297,6 +1303,9 @@ hrt_log_delta("gc sweep fixed size", tstamp);
|
|||
#endif
|
||||
h_passed->num_unswept_children--;
|
||||
if (!keep) {
|
||||
#if GC_DEBUG_TRACE
|
||||
fprintf(stderr, "heap %p marked for deletion\n", h);
|
||||
#endif
|
||||
// Heap marked for deletion, remove it and keep searching
|
||||
gc_heap *freed = gc_heap_free(h, h_prev);
|
||||
if (freed) {
|
||||
|
@ -1318,6 +1327,9 @@ hrt_log_delta("gc sweep fixed size", tstamp);
|
|||
} else {
|
||||
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
||||
h->is_full = 1;
|
||||
#if GC_DEBUG_TRACE
|
||||
fprintf(stderr, "heap %p is full\n", h);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue