Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2ed5d2b authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jaroslav Škarvada <jskarvad@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-c2ynv0ozr3eifzsyit6qgh3h@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 63cd02d8
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -42,10 +42,10 @@ def main(context_switch = 0, thread = -1):
			event = evlist.read_on_cpu(cpu)
			event = evlist.read_on_cpu(cpu)
			if not event:
			if not event:
				continue
				continue
			print "cpu: %2d, pid: %4d, tid: %4d" % (event.sample_cpu,
			print("cpu: {0}, pid: {1}, tid: {2} {3}".format(event.sample_cpu,
                                                                        event.sample_pid,
                                                                        event.sample_pid,
								event.sample_tid),
                                                                        event.sample_tid,
			print event
                                                                        event))


if __name__ == '__main__':
if __name__ == '__main__':
    """
    """