Skip to content

Commit

Permalink
mallocstacks: validating before stacktrace walk
Browse files Browse the repository at this point in the history
  • Loading branch information
devidasjadhav authored and yonghong-song committed Mar 29, 2020
1 parent 915d6d7 commit 472f9b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/tracing/mallocstacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@

for k, v in reversed(sorted(calls.items(), key=lambda c: c[1].value)):
print("%d bytes allocated at:" % v.value)
for addr in stack_traces.walk(k.value):
printb(b"\t%s" % b.sym(addr, pid, show_offset=True))
if k.value > 0 :
for addr in stack_traces.walk(k.value):
printb(b"\t%s" % b.sym(addr, pid, show_offset=True))

0 comments on commit 472f9b3

Please sign in to comment.