Tanu M
7e2022af79
perf python: Convert tracepoint.py example to python3
...
Convert the tracepoint.py file to python3 as many of the files in
tools/perf are already written in python3.
Committer testing:
# export PYTHONPATH=/tmp/build/perf/python/
# python3 ~acme/git/perf/tools/perf/python/tracepoint.py | head
time 67394457376909 prev_comm=swapper/12 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=gnome-terminal- next_pid=3313 next_prio=120
time 67394457807669 prev_comm=python3 prev_pid=1485930 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/13 next_pid=0 next_prio=120
time 67394457811859 prev_comm=swapper/13 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=python3 next_pid=1485930 next_prio=120
time 67394457824929 prev_comm=python3 prev_pid=1485930 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/13 next_pid=0 next_prio=120
time 67394457831899 prev_comm=swapper/13 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=python3 next_pid=1485930 next_prio=120
time 67394457842299 prev_comm=python3 prev_pid=1485930 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/13 next_pid=0 next_prio=120
time 67394457844179 prev_comm=swapper/13 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=python3 next_pid=1485930 next_prio=120
time 67394457853879 prev_comm=python3 prev_pid=1485930 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/13 next_pid=0 next_prio=120
time 67394457856339 prev_comm=swapper/13 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=python3 next_pid=1485930 next_prio=120
time 67394457865659 prev_comm=python3 prev_pid=1485930 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/13 next_pid=0 next_prio=120
Traceback (most recent call last):
File "/var/home/acme/git/perf/tools/perf/python/tracepoint.py", line 48, in <module>
main()
File "/var/home/acme/git/perf/tools/perf/python/tracepoint.py", line 37, in main
print("time %u prev_comm=%s prev_pid=%d prev_prio=%d prev_state=0x%x ==> next_comm=%s next_pid=%d next_prio=%d" % (
BrokenPipeError: [Errno 32] Broken pipe
#
Signed-off-by: Tanu M <tanu235m@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/linux-perf-users/CAPS78prawYzRZnyhWjgOnGw4EwoswNwztvfZFdCOPOydFzVwzQ@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-04-01 16:19:35 -03:00
..
2022-04-01 16:19:35 -03:00
2022-04-01 16:19:35 -03:00
2021-12-16 12:18:11 -03:00
2022-03-25 15:24:50 -03:00
2021-03-23 17:13:43 -03:00
2021-08-11 09:35:24 -03:00
2021-03-23 17:13:43 -03:00
2022-03-18 11:43:51 -03:00
2022-04-01 16:19:35 -03:00
2022-02-15 17:15:07 -03:00
2022-03-27 13:42:32 -07:00
2022-04-01 16:19:34 -03:00
2022-01-10 15:47:30 -03:00
2022-04-01 16:19:35 -03:00
2021-11-08 11:33:35 -08:00
2021-02-09 15:42:57 -03:00
2022-02-16 10:38:55 -03:00
2021-12-16 12:18:11 -03:00
2022-01-15 17:41:25 -03:00
2021-08-02 10:06:51 -03:00
2022-03-26 10:55:57 -03:00
2021-10-08 15:14:50 -03:00
2022-02-22 21:23:08 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2022-04-01 16:19:35 -03:00
2022-02-11 14:31:22 -03:00
2022-03-26 10:55:57 -03:00
2022-03-26 10:55:57 -03:00
2021-10-25 13:47:42 -03:00
2022-03-26 10:55:57 -03:00
2022-03-26 10:55:57 -03:00
2022-02-11 14:31:22 -03:00
2022-04-01 16:19:35 -03:00
2022-02-15 17:15:29 -03:00
2022-03-26 10:55:57 -03:00
2022-03-26 10:55:57 -03:00
2022-04-01 16:19:35 -03:00
2022-03-26 10:55:57 -03:00
2022-04-01 16:19:35 -03:00
2022-02-17 18:40:54 -03:00
2020-11-04 09:42:40 -03:00
2021-02-09 15:42:57 -03:00
2022-03-26 10:53:45 -03:00
2021-04-20 08:40:20 -03:00
2021-11-13 18:11:50 -03:00
2021-04-20 08:43:58 -03:00
2021-12-07 22:18:24 -03:00
2022-04-01 16:19:35 -03:00
2021-11-07 15:39:28 -03:00
2021-03-06 16:54:31 -03:00
2021-04-20 08:40:20 -03:00
2020-09-10 11:55:37 -03:00
2021-05-27 13:24:22 -03:00