From baee03c569c91b745a1e025660b19a718db16e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Thu, 28 Sep 2017 12:18:58 +0200 Subject: New upstream version 3.0.0 --- bin/caller-tree.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/caller-tree.py') 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: -- cgit v1.2.3