diff options
author | William Cohen <wcohen@redhat.com> | 2008-12-09 11:20:11 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2008-12-09 11:20:11 -0500 |
commit | 4ffc629674ac7d1d84b93cb7fdca71953983f762 (patch) | |
tree | dca338602903ba87b69592b40faa35ca74b7966e /testsuite/systemtap.examples/process/futexes.stp | |
parent | 73dc0c77745ee09db15542c14f7e048f91e121e6 (diff) | |
download | systemtap-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-x | testsuite/systemtap.examples/process/futexes.stp | 33 |
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])) } |