]> Git Repo - linux.git/blobdiff - tools/perf/scripts/python/stackcollapse.py
Merge tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux.git] / tools / perf / scripts / python / stackcollapse.py
index 1697b5e18c9622bdc82f7f9355745febb0a28705..b1c4def1410a8aea617b0843b681eb7435a892dc 100755 (executable)
 # Written by Paolo Bonzini <[email protected]>
 # Based on Brendan Gregg's stackcollapse-perf.pl script.
 
+from __future__ import print_function
+
 import os
 import sys
 from collections import defaultdict
 from optparse import OptionParser, make_option
 
 sys.path.append(os.environ['PERF_EXEC_PATH'] + \
-                '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
+    '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
 
 from perf_trace_context import *
 from Core import *
@@ -120,7 +122,6 @@ def process_event(param_dict):
     lines[stack_string] = lines[stack_string] + 1
 
 def trace_end():
-    list = lines.keys()
-    list.sort()
+    list = sorted(lines)
     for stack in list:
-        print "%s %d" % (stack, lines[stack])
+        print("%s %d" % (stack, lines[stack]))
This page took 0.033344 seconds and 4 git commands to generate.