aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/python/twatch.py
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2018-02-19 12:24:13 -0300
committerArnaldo Carvalho de Melo <[email protected]>2018-02-19 12:28:08 -0300
commitd2ed5d2bdc5cd30b44dc52c44c63f08c0a31b845 (patch)
tree5c2ac97e6dc2ebf0650bf2432e45adf0f641dd2a /tools/perf/python/twatch.py
parent63cd02d84be5f7b3bc4f8fbb93cc1f871f84ae1d (diff)
perf python: Make twatch.py work with both python2 and python3
Will be used to test patches allowing to build perf with python3, so that we make sure that we can build with both versions. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jaroslav Škarvada <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/python/twatch.py')
-rwxr-xr-xtools/perf/python/twatch.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/python/twatch.py b/tools/perf/python/twatch.py
index c235c22b107a..0a29c5c3079f 100755
--- a/tools/perf/python/twatch.py
+++ b/tools/perf/python/twatch.py
@@ -42,10 +42,10 @@ def main(context_switch = 0, thread = -1):
event = evlist.read_on_cpu(cpu)
if not event:
continue
- print "cpu: %2d, pid: %4d, tid: %4d" % (event.sample_cpu,
- event.sample_pid,
- event.sample_tid),
- print event
+ print("cpu: {0}, pid: {1}, tid: {2} {3}".format(event.sample_cpu,
+ event.sample_pid,
+ event.sample_tid,
+ event))
if __name__ == '__main__':
"""