Skip to content

Commit

Permalink
offwaketime: Fix incorrect target and waker PIDs
Browse files Browse the repository at this point in the history
offwaketime reports target and waker PIDs inversely.
This patch fixes this issue.

Signed-off-by: Yohei Ueda <[email protected]>
  • Loading branch information
yoheiueda authored and yonghong-song committed Aug 11, 2019
1 parent 1d858c0 commit 89bb40a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/offwaketime.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def signal_ignore(signal, frame):
print("%s %d" % (";".join(line), v.value))
else:
# print wakeup name then stack in reverse order
print(" %-16s %s %s" % ("waker:", k.waker.decode('utf-8', 'replace'), k.t_pid))
print(" %-16s %s %s" % ("waker:", k.waker.decode('utf-8', 'replace'), k.w_pid))
if not args.kernel_stacks_only:
if stack_id_err(k.w_u_stack_id):
print(" [Missed User Stack]")
Expand Down Expand Up @@ -383,7 +383,7 @@ def signal_ignore(signal, frame):
else:
for addr in target_user_stack:
print(" %s" % b.sym(addr, k.t_tgid))
print(" %-16s %s %s" % ("target:", k.target.decode('utf-8', 'replace'), k.w_pid))
print(" %-16s %s %s" % ("target:", k.target.decode('utf-8', 'replace'), k.t_pid))
print(" %d\n" % v.value)

if missing_stacks > 0:
Expand Down

0 comments on commit 89bb40a

Please sign in to comment.