21 lines
384 B
Plaintext
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));
|
|
}
|