From b9f8f4ac96a7c6a137b50ed02605696ac94eb43b Mon Sep 17 00:00:00 2001 From: Sasha Goldshtein Date: Wed, 8 Feb 2017 23:24:23 -0500 Subject: [PATCH] stackcount: Migrate to new symbol resolution API --- tools/old/stackcount.py | 5 +---- tools/stackcount.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/old/stackcount.py b/tools/old/stackcount.py index 7b4aa43eff06..28d25ce61404 100755 --- a/tools/old/stackcount.py +++ b/tools/old/stackcount.py @@ -145,10 +145,7 @@ def print_frame(addr): print(" ", end="") if verbose: print("%-16x " % addr, end="") - if offset: - print("%s" % b.ksymaddr(addr)) - else: - print("%s" % b.ksym(addr)) + print(b.ksym(addr, show_address=offset)) # output exiting = 0 if args.interval else 1 diff --git a/tools/stackcount.py b/tools/stackcount.py index c3457a71f142..506c94b3ce20 100755 --- a/tools/stackcount.py +++ b/tools/stackcount.py @@ -225,7 +225,7 @@ def _print_frame(self, addr, pid): if self.args.verbose: print("%-16x " % addr, end="") if self.args.offset: - print("%s" % self.probe.bpf.symaddr(addr, pid)) + print("%s" % self.probe.bpf.sym(addr, pid, show_address=True)) else: print("%s" % self.probe.bpf.sym(addr, pid))