Jiri Olsa
9881d7df9d
perf python: Add tracepoint example
To show how to enable a tracepoint and access its fields.
Committer note:
Testing it:
# ls -l /tmp/build/perf/python/perf.so
-rwxrwxr-x. 1 acme acme 1563256 Jul 12 16:19 /tmp/build/perf/python/perf.so
# export PYTHONPATH=/tmp/build/perf/python/
# tools/perf/python/tracepoint.py 2> /dev/null | head -200 | tail -10
time 76345337296548 prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=tracepoint.py- next_pid=18479 next_prio=120
time 76345338520479 prev_comm=gnome-shelln-b prev_pid=2186 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/1 next_pid=0 next_prio=120
time 76345337309942 prev_comm=tracepoint.py- prev_pid=18479 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/0 next_pid=0 next_prio=120
time 76345337312302 prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=tracepoint.py- next_pid=18479 next_prio=120
time 76345337324927 prev_comm=tracepoint.py- prev_pid=18479 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/0 next_pid=0 next_prio=120
time 76345337327115 prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=tracepoint.py- next_pid=18479 next_prio=120
time 76345338621750 prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=rcuos/2 next_pid=29 next_prio=120
time 76345338607922 prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=rcu_sched next_pid=7 next_prio=120
time 76345337338817 prev_comm=tracepoint.py- prev_pid=18479 prev_prio=120 prev_state=0x1 ==> next_comm=swapper/0 next_pid=0 next_prio=120
time 76345338627156 prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=0x0 ==> next_comm=head-terminal- next_pid=18480 next_prio=120
#
# strip /tmp/build/perf/python/perf.so
# ls -l /tmp/build/perf/python/perf.so
-rwxrwxr-x. 1 acme acme 319616 Jul 12 16:25 /tmp/build/perf/python/perf.so
Reported-and-Tested-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1468148882-10362-10-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-07-12 16:23:35 -03:00
..
2016-07-12 15:19:58 -03:00
2016-07-12 15:20:32 -03:00
2016-07-12 15:20:41 -03:00
2016-07-12 00:00:39 -03:00
2016-04-01 18:42:55 -03:00
2016-07-12 16:23:35 -03:00
2016-06-22 09:56:34 -03:00
2016-07-12 15:20:33 -03:00
2016-07-12 15:20:38 -03:00
2016-07-12 15:19:58 -03:00
2016-07-12 16:19:16 -03:00
2016-05-30 12:41:46 -03:00
2016-01-12 12:42:07 -03:00
2016-07-12 00:00:39 -03:00
2015-12-17 14:27:14 -03:00
2016-07-12 15:19:47 -03:00
2015-12-17 14:27:14 -03:00
2016-06-23 17:23:00 -03:00
2016-06-28 10:54:57 -03:00
2016-06-23 11:26:15 -03:00
2016-06-23 11:26:15 -03:00
2016-07-12 15:19:47 -03:00
2016-06-23 11:26:15 -03:00
2016-06-23 11:26:15 -03:00
2016-07-12 15:19:47 -03:00
2015-12-17 14:27:14 -03:00
2015-12-17 14:27:14 -03:00
2016-06-15 10:35:27 -03:00
2016-07-12 15:19:47 -03:00
2016-07-12 15:19:47 -03:00
2016-07-12 00:00:39 -03:00
2016-07-12 15:19:47 -03:00
2016-06-23 17:04:26 -03:00
2016-07-12 15:19:47 -03:00
2016-05-20 11:43:58 -03:00
2016-07-12 15:19:47 -03:00
2016-07-12 15:20:35 -03:00
2015-12-09 13:42:03 -03:00
2016-03-23 15:06:35 -03:00
2016-01-08 12:46:17 -03:00
2009-06-24 19:54:29 +02:00
2014-03-18 18:17:06 -03:00
2016-02-04 15:57:00 -03:00
2016-07-12 15:20:36 -03:00
2016-07-12 15:20:40 -03:00
2012-09-17 13:10:42 -03:00
2015-03-19 13:53:27 -03:00
2014-10-29 10:32:48 -02:00
2016-07-12 15:19:54 -03:00
2015-08-06 16:48:27 -03:00
2016-07-12 15:20:37 -03:00
2016-04-18 12:26:27 -03:00