Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
fixup! add temporary perf scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Fernandes <[email protected]>
  • Loading branch information
joelagnel committed Jun 26, 2018
1 parent 3a11fb1 commit 25f97a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bcc/misc/android-futex-contention.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def syscalls__sys_exit_futex(event, ctxt, cpu, s, ns, tid, comm, callchain,

# Track details about the maximum contention seen
# including owner and its callchain
if (tid, thread_thislock[tid]) in waker_wakee:
prev_wait = waker_wakee[(tid, thread_thislock[tid])][0]
if (tid, thread_thislock[tid]) in max_waits:
prev_wait = max_waits[(tid, thread_thislock[tid])][0]
else:
prev_wait = 0

Expand Down Expand Up @@ -110,6 +110,6 @@ def trace_end():

waker_pid = max_waits[tid, lock][1]
waker_name = process_names[waker_pid] if waker_pid in process_names else "nameless-owner"
print "Owner %s caused this contention of %d. Owner's Call stack below:" % (waker_name, max_waits[tid, lock][0])
print "Owner %s caused this contention of %d ns. Owner's Call stack below:" % (waker_name, max_waits[tid, lock][0])
print_callchain(max_waits[tid, lock][2])

0 comments on commit 25f97a0

Please sign in to comment.