1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Jip J. Dekker b5f0d64642 Squashed 'prototype/' content from commit 91f7db00
git-subtree-dir: prototype
git-subtree-split: 91f7db00d45e7f991b5587ee07f09977ae311ee7
2021-07-29 14:28:24 +10:00

21 lines
384 B
Plaintext

global time_in_gc, tmp_ts
probe process.mark("gc-start")
{
tmp_ts[$arg1] = gettimeofday_ns();
}
probe process.mark("gc-end")
{
delta = gettimeofday_ns() - tmp_ts[$arg1];
time_in_gc <<< delta;
delete tmp_ts[$arg1];
}
probe end
{
printf("Total GC passes: %d\n", @count(time_in_gc));
print(@hist_log(time_in_gc));
printf("Total time spent in GC: %d ns\n", @sum(time_in_gc));
}