| 1 |
fntimes.stp - Show Functions Taking Longer Than Usual |
| 2 |
|
| 3 |
The fntimes.stp script monitors the execution time history of a given |
| 4 |
function family (assumed non-recursive). Each time (beyond a warmup |
| 5 |
interval) is then compared to the historical maximum. If it exceeds |
| 6 |
a certain threshold (250%), a message is printed. |
| 7 |
|
| 8 |
$ stap fntimes.stp 'kernel.function("sys_*")' -T 7 |
| 9 |
|
| 10 |
function SyS_ioctl well over maximum time (32 vs 12) |
| 11 |
function SyS_open well over maximum time (2832 vs 188) |
| 12 |
function SyS_newfstat well over maximum time (5 vs 2) |
| 13 |
function SyS_mmap_pgoff well over maximum time (282 vs 12) |
| 14 |
function SyS_mmap well over maximum time (286 vs 15) |
| 15 |
function SyS_access well over maximum time (35 vs 11) |
| 16 |
function SyS_access well over maximum time (92 vs 35) |
| 17 |
function SyS_mprotect well over maximum time (44 vs 13) |
| 18 |
function SyS_futex well over maximum time (9753 vs 3260) |
| 19 |
function SyS_newstat well over maximum time (4882 vs 133) |
| 20 |
function SyS_recvmsg well over maximum time (607 vs 44) |
| 21 |
function SyS_futex well over maximum time (55896 vs 9753) |
| 22 |
function SyS_futex well over maximum time (500089 vs 55927) |
| 23 |
function SyS_poll well over maximum time (832629 vs 53308) |
| 24 |
|
| 25 |
Getting no output is not a bad thing; it means that means that functions |
| 26 |
did not exceed the threshold. |
| 27 |
|
| 28 |
This output was gathered by running ls repeatedly in another terminal |
| 29 |
a few seconds after the script started. |