summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples/profile.stp
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2009-02-10 16:42:15 -0500
committerWilliam Cohen <wcohen@redhat.com>2009-02-10 16:42:15 -0500
commit8ccdc31544c385b2b9ccf1206c983acdfb2d96e2 (patch)
tree17c272c409f96889ff13164884dd64d360e22710 /testsuite/systemtap.samples/profile.stp
parenta70a69bd47f2b0c7e8e4e99b7a630ebbedc5f264 (diff)
downloadsystemtap-steved-8ccdc31544c385b2b9ccf1206c983acdfb2d96e2.tar.gz
systemtap-steved-8ccdc31544c385b2b9ccf1206c983acdfb2d96e2.tar.xz
systemtap-steved-8ccdc31544c385b2b9ccf1206c983acdfb2d96e2.zip
Remove profile.exp and profile.stp.
Diffstat (limited to 'testsuite/systemtap.samples/profile.stp')
-rw-r--r--testsuite/systemtap.samples/profile.stp35
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])
- }
-}