Skip to content

Commit b545310

Browse files
committed
Write debug logs at start/end of GC collect
1 parent 8006dc7 commit b545310

File tree

1 file changed

+3
-0
lines changed
  • src/deemon/runtime

1 file changed

+3
-0
lines changed

src/deemon/runtime/gc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ PUBLIC WUNUSED size_t DCALL DeeGC_Collect(size_t max_objects) {
13101310
size_t count, result = 0;
13111311
struct gc_generation *iter;
13121312
unsigned int status, flags;
1313+
Dee_DPRINT("[gc.collect] Starting collect\n");
13131314
again:
13141315
if (!gc_collect_acquire(true))
13151316
goto err;
@@ -1371,10 +1372,12 @@ PUBLIC WUNUSED size_t DCALL DeeGC_Collect(size_t max_objects) {
13711372
goto again;
13721373
default: __builtin_unreachable();
13731374
}
1375+
Dee_DPRINTF("[gc.collect] Done. Collected %" PRFuSIZ " objects\n", result);
13741376
if unlikely(result == (size_t)-1)
13751377
result = (size_t)-2;
13761378
return result;
13771379
err:
1380+
Dee_DPRINT("[gc.collect] Error\n");
13781381
return (size_t)-1;
13791382
}
13801383

0 commit comments

Comments
 (0)