lokinet/contrib/dtrace/profiler.d

19 lines
216 B
D
Raw Normal View History

2018-10-29 14:11:28 +00:00
#!/usr/sbin/dtrace -s
2018-10-29 13:31:37 +00:00
syscall:::entry
2018-10-29 14:37:20 +00:00
/pid == $target/
2018-10-29 13:31:37 +00:00
{
2018-10-29 14:37:20 +00:00
@calls[ustack(10), probefunc] = count();
2018-10-29 13:31:37 +00:00
}
profile:::tick-1sec
{
2018-10-29 14:29:28 +00:00
/** print */
printa(@calls);
/** clear */
2018-10-29 14:37:20 +00:00
clear(@calls);
trunc(@calls, 15);
2018-10-29 13:31:37 +00:00
}