Skip to content

Commit

Permalink
offwaketime: properly format "[Missed User Stack]" with folded output (
Browse files Browse the repository at this point in the history
…iovisor#2051)

In folded output format when both kernel and user stacks are missing,
the message "[Missing User Stack]" is formatted incorrectly, for example:

chrome;entry_SYSCALL_64_after_hwframe;do_syscall_64;SyS_poll;do_sys_poll;poll_schedule_timeout;schedule_hrtimeout_range;schedule_hrtimeout_range_clock;schedule;--;[Missed Kernel Stack];[;M;i;s;s;e;d; ;U;s;e;r; ;S;t;a;c;k;];fio 4955989

This is because we're incorrectly appending the missing stack message in
the list of stack entries. Fix by appending the message as a single item.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
arighi authored and yonghong-song committed Nov 20, 2018
1 parent 5b76047 commit 7813f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/offwaketime.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def signal_ignore(signal, frame):
if not args.kernel_stacks_only:
line.extend(["-"] if (need_delimiter and k.w_u_stack_id > 0 and k.w_k_stack_id > 0) else [])
if stack_id_err(k.w_u_stack_id):
line.extend("[Missed User Stack]")
line.append("[Missed User Stack]")
else:
line.extend([b.sym(addr, k.w_tgid)
for addr in reversed(list(waker_user_stack))])
Expand Down

0 comments on commit 7813f8e

Please sign in to comment.