Skip to content

Commit

Permalink
off{cpu,wake}time: Migrate to new symbols API and remove addresses
Browse files Browse the repository at this point in the history
Remove addresses from stack output, as these are not used in the
vast majority of the cases.
  • Loading branch information
goldshtn committed Feb 21, 2017
1 parent b1bff01 commit 2f78068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tools/offcputime.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ def signal_ignore(signal, frame):
else:
# print default multi-line stack output
for addr in kernel_stack:
print(" %016x %s" % (addr, b.ksym(addr)))
print(" %s" % b.ksym(addr))
if need_delimiter:
print(" --")
for addr in user_stack:
print(" %016x %s" % (addr, b.sym(addr, k.tgid)))
print(" %s" % b.sym(addr, k.tgid))
print(" %-16s %s (%d)" % ("-", k.name, k.pid))
print(" %d\n" % v.value)

Expand Down
8 changes: 4 additions & 4 deletions tools/offwaketime.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,22 +308,22 @@ def signal_ignore(signal, frame):
# print wakeup name then stack in reverse order
print(" %-16s %s %s" % ("waker:", k.waker, k.t_pid))
for addr in waker_user_stack:
print(" %016x %s" % (addr, b.sym(addr, k.tgid)))
print(" %s" % b.sym(addr, k.tgid))
if args.delimited:
print(" -")
for addr in waker_kernel_stack:
print(" %016x %s" % (addr, b.ksym(addr)))
print(" %s" % b.ksym(addr))

# print waker/wakee delimiter
print(" %-16s %s" % ("--", "--"))

# print default multi-line stack output
for addr in target_kernel_stack:
print(" %016x %s" % (addr, b.ksym(addr)))
print(" %s" % b.ksym(addr))
if args.delimited:
print(" -")
for addr in target_user_stack:
print(" %016x %s" % (addr, b.sym(addr, k.tgid)))
print(" %s" % b.sym(addr, k.tgid))
print(" %-16s %s %s" % ("target:", k.target, k.w_pid))
print(" %d\n" % v.value)

Expand Down

0 comments on commit 2f78068

Please sign in to comment.