diff options
| author | Mark Brown <[email protected]> | 2019-03-19 13:12:32 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2019-03-19 13:12:32 +0000 |
| commit | 249acb5f47df27109d74a0d904a5da56c8bac28f (patch) | |
| tree | bade04b7c88324eaf6f826dd69a10146edd9a819 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9384d0e6facc9f5b325a2d401e9ed6bb49507a2a (diff) | |
| parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) | |
Merge tag 'v5.1-rc1' into spi-5.2
Linux 5.1-rc1
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
| -rwxr-xr-x | tools/perf/scripts/python/stackcollapse.py | 9 |
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 <[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])) |