Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 2b12d0199a2bbc4a02ef3834d926ac4a > files > 251

systemtap-client-1.8-6.el5.x86_64.rpm

title: Show Functions Taking Longer Than Usual
name: fntimes.stp
version: 1.0
author: anonymous
keywords: profiling
subsystem: any
status: proposed
exit: user-controlled
output: trace
scope: system-wide
description: The fntimes.stp script monitors the execution time history of a given function family (assumed non-recursive).  Each time (beyond a warmup interval) is then compared to the historical maximum.  If it exceeds a certain threshold (250%), a message is printed.
test_check: stap -p4 fntimes.stp 'kernel.function("sys_*")'
test_installcheck: stap fntimes.stp 'kernel.function("sys_*")' -c "sleep 7"