stackcount: Migrate to new symbol resolution API
authorSasha Goldshtein <goldshtn@gmail.com>
Thu, 9 Feb 2017 04:24:23 +0000 (23:24 -0500)
committerSasha Goldshtein <goldshtn@gmail.com>
Tue, 21 Feb 2017 09:30:43 +0000 (09:30 +0000)
tools/old/stackcount.py
tools/stackcount.py

index 7b4aa43..28d25ce 100755 (executable)
@@ -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
index c3457a7..506c94b 100755 (executable)
@@ -225,7 +225,7 @@ class Tool(object):
         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))