summaryrefslogtreecommitdiff
path: root/bin/caller-tree.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 13:15:47 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 13:15:47 +0200
commitb0c36cefa1e0a4bf99681aade9e26ac6aa1ef903 (patch)
treed63dc2036a39e716daf18e3c915fafb2fcba6674 /bin/caller-tree.py
parent6be31f5d140b81227911cabfc61d3802c76c1b61 (diff)
parenta5d26f7b62414ed38e1815a49a864b15df2e9694 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'bin/caller-tree.py')
-rw-r--r--bin/caller-tree.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/caller-tree.py b/bin/caller-tree.py
index 03c1616..18cd9e1 100644
--- a/bin/caller-tree.py
+++ b/bin/caller-tree.py
@@ -39,6 +39,7 @@
# function at the same time, for example, their counts will intermix.
# So use this to get a *general* idea of who's calling what, not for
# fine-grained performance tuning.
+from __future__ import print_function
import sys
@@ -74,19 +75,19 @@ for line in sys.stdin.readlines():
stack = []
def print_entry(e, level, calls):
- print '%-72s%6s' % ((' '*2*level) + e.file_line_func, calls)
+ print('%-72s%6s' % ((' '*2*level) + e.file_line_func, calls))
if e in stack:
- print (' '*2*(level+1))+'RECURSION'
- print
+ print((' '*2*(level+1))+'RECURSION')
+ print()
elif e.called_by:
stack.append(e)
for c in e.called_by:
print_entry(c[0], level+1, c[1])
stack.pop()
else:
- print
+ print()
-for e in [ e for e in AllCalls.values() if not e.calls ]:
+for e in [ e for e in list(AllCalls.values()) if not e.calls ]:
print_entry(e, 0, '')
# Local Variables: