Skip to content

Commit b9f8f4a

Browse files
committed
stackcount: Migrate to new symbol resolution API
1 parent 860823b commit b9f8f4a

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

tools/old/stackcount.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ def print_frame(addr):
145145
print(" ", end="")
146146
if verbose:
147147
print("%-16x " % addr, end="")
148-
if offset:
149-
print("%s" % b.ksymaddr(addr))
150-
else:
151-
print("%s" % b.ksym(addr))
148+
print(b.ksym(addr, show_address=offset))
152149

153150
# output
154151
exiting = 0 if args.interval else 1

tools/stackcount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def _print_frame(self, addr, pid):
225225
if self.args.verbose:
226226
print("%-16x " % addr, end="")
227227
if self.args.offset:
228-
print("%s" % self.probe.bpf.symaddr(addr, pid))
228+
print("%s" % self.probe.bpf.sym(addr, pid, show_address=True))
229229
else:
230230
print("%s" % self.probe.bpf.sym(addr, pid))
231231

0 commit comments

Comments
 (0)