aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-07-12 15:52:35 +0200
committerIngo Molnar <mingo@kernel.org>2018-07-12 15:52:35 +0200
commit6e1d33b24a2b4aebcb05782e937ebc9a7a4a3f50 (patch)
tree8f75c8e622d1e85a4cfb3b7695db41d7a6dca95e /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
parent092150a25cb7bd6a79aa00bb1ad131063f58073d (diff)
parent32aa928a7b817140c84987b726d5014911808fa4 (diff)
Merge tag 'perf-urgent-for-mingo-4.18-20180711' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo: python interface fixes: - Make 'perf script -g python' generate scripts that are compatible with both python 2 and 3 (Jeremy Cline) - Fix python dictionary reference counting (Janne Huttunen) - Add python3 support for various python scripts (Jeremy Cline) - Use python-config --includes rather than --cflags, fixing the build on Fedora, where the python 3.7 started adding -flto to what perf stat fixes: - Remove needless extra header line in --interval_clear (Jiri Olsa) python-config --cflags generate, breaking the perf build (Jeremy Cline) Build fixes: - Fix compilation errors on gcc8 (Jiri Olsa) perf llvm-utils fixes: - Remove bashism from kernel include fetch script (Kim Phillips) perf test fixes: (Kim Phillips) - Replace '|&' with '2>&1 |' to work with more shells - Make perf's inet_pton test more portable - Prevent temporary editor files from being considered test scripts Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
-rwxr-xr-xtools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
index 81a56cd2b3c1..21a7a1298094 100755
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -8,6 +8,7 @@
# PerfEvent is the base class for all perf event sample, PebsEvent
# is a HW base Intel x86 PEBS event, and user could add more SW/HW
# event classes based on requirements.
+from __future__ import print_function
import struct
@@ -44,7 +45,8 @@ class PerfEvent(object):
PerfEvent.event_num += 1
def show(self):
- print "PMU event: name=%12s, symbol=%24s, comm=%8s, dso=%12s" % (self.name, self.symbol, self.comm, self.dso)
+ print("PMU event: name=%12s, symbol=%24s, comm=%8s, dso=%12s" %
+ (self.name, self.symbol, self.comm, self.dso))
#
# Basic Intel PEBS (Precise Event-based Sampling) event, whose raw buffer