Skip to content

Commit

Permalink
BPF: better format for ksymaddr
Browse files Browse the repository at this point in the history
The offset is now returned after a `+` symbol, instead of directly
attached to the symbol name (which made reading the output very
confusing)

Before:
    tick_do_update_jiffies64a0

After:
    tick_do_update_jiffies64+0xa0
  • Loading branch information
vmg committed Mar 27, 2016
1 parent e82fb1b commit 3a137db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def ksymaddr(addr):
if idx == -1:
return "[unknown]"
offset = int(addr - ksyms[idx][1])
return ksyms[idx][0] + hex(offset)
return "%s+0x%x" % (ksyms[idx][0], offset)

@staticmethod
def ksymname(name):
Expand Down

0 comments on commit 3a137db

Please sign in to comment.