mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 19:56:34 +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
|
#endif
|
||||||
h_passed->num_unswept_children--;
|
h_passed->num_unswept_children--;
|
||||||
if (!keep) {
|
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
|
// Heap marked for deletion, remove it and keep searching
|
||||||
gc_heap *freed = gc_heap_free(h, h_prev);
|
gc_heap *freed = gc_heap_free(h, h_prev);
|
||||||
if (freed) {
|
if (freed) {
|
||||||
|
@ -1213,6 +1216,9 @@ hrt_log_delta("gc sweep", tstamp);
|
||||||
} else {
|
} else {
|
||||||
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
||||||
h->is_full = 1;
|
h->is_full = 1;
|
||||||
|
#if GC_DEBUG_TRACE
|
||||||
|
fprintf(stderr, "heap %p is full\n", h);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1297,6 +1303,9 @@ hrt_log_delta("gc sweep fixed size", tstamp);
|
||||||
#endif
|
#endif
|
||||||
h_passed->num_unswept_children--;
|
h_passed->num_unswept_children--;
|
||||||
if (!keep) {
|
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
|
// Heap marked for deletion, remove it and keep searching
|
||||||
gc_heap *freed = gc_heap_free(h, h_prev);
|
gc_heap *freed = gc_heap_free(h, h_prev);
|
||||||
if (freed) {
|
if (freed) {
|
||||||
|
@ -1318,6 +1327,9 @@ hrt_log_delta("gc sweep fixed size", tstamp);
|
||||||
} else {
|
} else {
|
||||||
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
// TODO: else, assign heap full? YES for fixed-size, for REST maybe not??
|
||||||
h->is_full = 1;
|
h->is_full = 1;
|
||||||
|
#if GC_DEBUG_TRACE
|
||||||
|
fprintf(stderr, "heap %p is full\n", h);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue