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

23 lines
220 B
D

#!/usr/sbin/dtrace -s
dtrace::BEGIN
{
}
syscall:::entry
/pid == $1/
{
@syscalls[probefunc] = count();
}
profile:::tick-1sec
{
printa(@syscalls);
foreach(k; @syscalls.keys.sort)
{
@syscalls[k] = 0;
}
}