lokinet/contrib/dtrace/profiler.d
2018-10-29 10:37:20 -04:00

19 lines
216 B
D

#!/usr/sbin/dtrace -s
syscall:::entry
/pid == $target/
{
@calls[ustack(10), probefunc] = count();
}
profile:::tick-1sec
{
/** print */
printa(@calls);
/** clear */
clear(@calls);
trunc(@calls, 15);
}