diff options
Diffstat (limited to 'testsuite/systemtap.samples/profile.stp')
-rw-r--r-- | testsuite/systemtap.samples/profile.stp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/testsuite/systemtap.samples/profile.stp b/testsuite/systemtap.samples/profile.stp deleted file mode 100644 index 62af76ae..00000000 --- a/testsuite/systemtap.samples/profile.stp +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/env stap - -global command, syscall_count, syscall_times, this_syscall_time, this_syscall - -function accumulate () { - tid = tid() - if (! ([tid] in command)) command[tid] = execname() - syscall=pp() # just the substring ideally - syscall_count[tid,syscall] ++ - this_syscall[tid] = syscall - this_syscall_time[tid] = gettimeofday_us() -} -function decumulate () { - tid = tid() - syscall = this_syscall[tid] - syscall_times[tid,syscall] += gettimeofday_us() - this_syscall_time[tid] - # free up memory - delete(this_syscall[tid]) - delete(this_syscall_time[tid]) -} -probe kernel.function("sys_*").call { - accumulate () -} -probe kernel.function("sys_*").return { - decumulate () -} -probe timer.ms(5000) { - exit () -} -probe end { - foreach ([tid,syscall] in syscall_count- limit 30) { - printf("%s(%d) %s count=%d ttime=%d\n", command[tid], tid, syscall, - syscall_count[tid,syscall], syscall_times[tid,syscall]) - } -} |