summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/process/futexes.stp
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2008-12-09 11:20:11 -0500
committerWilliam Cohen <wcohen@redhat.com>2008-12-09 11:20:11 -0500
commit4ffc629674ac7d1d84b93cb7fdca71953983f762 (patch)
treedca338602903ba87b69592b40faa35ca74b7966e /testsuite/systemtap.examples/process/futexes.stp
parent73dc0c77745ee09db15542c14f7e048f91e121e6 (diff)
downloadsystemtap-steved-4ffc629674ac7d1d84b93cb7fdca71953983f762.tar.gz
systemtap-steved-4ffc629674ac7d1d84b93cb7fdca71953983f762.tar.xz
systemtap-steved-4ffc629674ac7d1d84b93cb7fdca71953983f762.zip
Tweak formatting, indent two space.
Diffstat (limited to 'testsuite/systemtap.examples/process/futexes.stp')
-rwxr-xr-xtestsuite/systemtap.examples/process/futexes.stp33
1 files changed, 17 insertions, 16 deletions
diff --git a/testsuite/systemtap.examples/process/futexes.stp b/testsuite/systemtap.examples/process/futexes.stp
index 16c62937..0bd63262 100755
--- a/testsuite/systemtap.examples/process/futexes.stp
+++ b/testsuite/systemtap.examples/process/futexes.stp
@@ -11,26 +11,27 @@ global lock_waits # long-lived stats on (tid,lock) blockage elapsed time
global process_names # long-lived pid-to-execname mapping
probe syscall.futex {
- if (op != FUTEX_WAIT) next # we don't care about originators of WAKE events
- t = tid ()
- process_names[pid()] = execname()
- thread_thislock[t] = $uaddr
- thread_blocktime[t] = gettimeofday_us()
+ if (op != FUTEX_WAIT) next # we don't care about originators of WAKE events
+ t = tid ()
+ process_names[pid()] = execname()
+ thread_thislock[t] = $uaddr
+ thread_blocktime[t] = gettimeofday_us()
}
probe syscall.futex.return {
- t = tid()
- ts = thread_blocktime[t]
- if (ts) {
- elapsed = gettimeofday_us() - ts
- lock_waits[pid(), thread_thislock[t]] <<< elapsed
- delete thread_blocktime[t]
- delete thread_thislock[t]
- }
+ t = tid()
+ ts = thread_blocktime[t]
+ if (ts) {
+ elapsed = gettimeofday_us() - ts
+ lock_waits[pid(), thread_thislock[t]] <<< elapsed
+ delete thread_blocktime[t]
+ delete thread_thislock[t]
+ }
}
probe end {
- foreach ([pid+, lock] in lock_waits)
- printf ("%s[%d] lock %p contended %d times, %d avg us\n",
- process_names[pid], pid, lock, @count(lock_waits[pid,lock]), @avg(lock_waits[pid,lock]))
+ foreach ([pid+, lock] in lock_waits)
+ printf ("%s[%d] lock %p contended %d times, %d avg us\n",
+ process_names[pid], pid, lock, @count(lock_waits[pid,lock]),
+ @avg(lock_waits[pid,lock]))
}