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

19 lines
197 B
D

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