summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-04-01 14:12:09 +0300
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-04-01 14:12:09 +0300
commitdf7686101956929dcea410971656e34926773b88 (patch)
tree894b908e0a3580f4f98b143207bead6ec5df922c /tools/perf/scripts/python/stackcollapse.py
parent9a9f1d1a81a972513636c333e26c542f8aebae55 (diff)
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
downloadlinux-df7686101956929dcea410971656e34926773b88.tar.xz
Merge tag 'v5.1-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 5.1-rc3 Sync with upstream (which now contains fbdev-v5.1 changes) to prepare a base for fbdev-v5.2 changes.
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
-rwxr-xr-xtools/perf/scripts/python/stackcollapse.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/scripts/python/stackcollapse.py b/tools/perf/scripts/python/stackcollapse.py
index 1697b5e18c96..b1c4def1410a 100755
--- a/tools/perf/scripts/python/stackcollapse.py
+++ b/tools/perf/scripts/python/stackcollapse.py
@@ -19,13 +19,15 @@
# Written by Paolo Bonzini <pbonzini@redhat.com>
# 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]))