History

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.

Arnaldo Carvalho de Melo committed 8 years ago

Commit d2ed5d21 parent 63cd02d1 file · +4 −4Browse files

Showing the changes to tools/perf/python (1 of 1 file). Show all

Unified · Split

tools/perf/python/twatch.py+4−4
@@ -42,10 +42,10 @@ def main(context_switch = 0, thread = -1): · 41 unmodified lines
4242 event = evlist.read_on_cpu(cpu)
4343 if not event:
4444 continue
45− print "cpu: %2d, pid: %4d, tid: %4d" % (event.sample_cpu,
46− event.sample_pid,
47− event.sample_tid),
48− print event
45+ print("cpu: {0}, pid: {1}, tid: {2} {3}".format(event.sample_cpu,
46+ event.sample_pid,
47+ event.sample_tid,
48+ event))
4949
5050 if __name__ == '__main__':
5151 """