offwaketime: Fix incorrect target and waker PIDs
offwaketime reports target and waker PIDs inversely.
This patch fixes this issue.
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
diff --git a/tools/offwaketime.py b/tools/offwaketime.py
index 4a1ceba..b46e9e1 100755
--- a/tools/offwaketime.py
+++ b/tools/offwaketime.py
@@ -350,7 +350,7 @@
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]")
@@ -383,7 +383,7 @@
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: