Arnaldo Carvalho de Melo
ae93880244
perf python: Support the PERF_RECORD_SWITCH event
To test it check tools/perf/python/twatch.py, after following the
instructions there to enable context_switch, output looks like:
[root@zoo linux]# tools/perf/python/twatch.py
cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 0 }
cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 1 }
cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 0 }
cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 1 }
cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 1 }
cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
^CTraceback (most recent call last):
File "tools/perf/python/twatch.py", line 67, in <module>
main(context_switch = 1, thread = 31463)
File "tools/perf/python/twatch.py", line 40, in main
evlist.poll(timeout = -1)
KeyboardInterrupt
[root@zoo linux]#
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Guy Streeter <streeter@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-1ukistmpamc5z717k80ctcp2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-10-07 19:41:50 -03:00
..
2015-09-15 09:48:33 -03:00
2015-09-28 16:45:26 -03:00
2015-09-28 17:09:12 -03:00
2013-12-27 15:17:00 -03:00
2015-08-21 10:29:23 -03:00
2015-10-05 16:15:38 -03:00
2015-09-28 16:53:44 -03:00
2015-09-28 16:53:44 -03:00
2015-09-30 18:34:27 -03:00
2015-08-28 14:53:50 -03:00
2015-08-28 14:53:50 -03:00
2015-05-14 10:05:22 -03:00
2015-08-08 14:16:49 -03:00
2015-08-08 14:16:49 -03:00
2015-05-15 16:12:20 -03:00
2015-05-15 16:12:20 -03:00
2015-06-25 12:28:35 -03:00
2015-08-05 16:56:16 -03:00
2015-08-05 16:46:06 -03:00
2015-08-05 16:44:02 -03:00
2015-05-27 12:21:43 -03:00
2014-10-29 10:32:49 -02:00
2015-08-07 10:16:59 -03:00
2015-08-08 14:16:49 -03:00
2015-08-08 14:16:49 -03:00
2015-09-14 12:50:27 -03:00
2015-09-02 16:30:47 -03:00
2015-04-29 10:37:49 -03:00
2015-04-02 13:18:52 -03:00
2014-08-15 10:58:35 -03:00
2013-12-02 09:22:46 -03:00
2015-05-29 12:43:39 -03:00
2015-04-02 13:18:43 -03:00
2015-08-06 15:30:38 -03:00
2015-08-06 15:30:38 -03:00
2015-06-08 10:31:40 -03:00
2015-08-24 13:33:14 -03:00
2015-08-13 14:51:26 -03:00
2015-05-14 10:05:09 -03:00
2015-09-14 12:50:28 -03:00
2015-09-14 12:50:28 -03:00
2015-05-14 10:05:22 -03:00
2015-10-06 18:04:59 -03:00
2015-09-28 16:51:33 -03:00
2015-10-05 16:16:20 -03:00
2015-10-05 16:16:20 -03:00
2015-10-05 16:21:11 -03:00
2015-10-05 16:21:11 -03:00
2014-10-29 10:32:48 -02:00
2013-10-09 08:48:28 +02:00
2015-09-16 09:19:56 +02:00
2015-09-14 12:50:19 -03:00
2013-12-27 17:08:19 -03:00
2015-10-05 16:33:41 -03:00
2015-10-05 16:32:00 -03:00
2015-09-02 17:46:26 -03:00
2015-08-21 11:34:10 -03:00
2015-09-30 18:34:29 -03:00
2015-08-24 17:46:43 -03:00
2013-10-14 10:28:48 -03:00
2013-10-14 10:28:48 -03:00
2015-04-02 13:18:47 -03:00
2015-08-07 10:57:24 -03:00
2015-08-07 10:57:24 -03:00
2015-03-21 14:53:40 -03:00
2015-10-01 09:56:06 -03:00
2015-09-30 18:34:29 -03:00
2015-09-30 18:34:29 -03:00
2015-09-30 18:34:25 -03:00
2015-08-24 17:16:22 -03:00
2015-03-31 17:52:32 -03:00
2015-05-14 10:05:22 -03:00
2015-06-07 16:08:31 +02:00
2015-05-27 21:02:17 -03:00
2015-10-05 17:59:50 -03:00
2015-09-28 17:30:07 -03:00
2015-10-05 16:21:11 -03:00
2015-09-28 17:30:07 -03:00
2015-09-14 12:50:21 -03:00
2015-05-05 18:13:01 -03:00
2015-08-31 18:01:33 -03:00
2015-08-31 18:01:33 -03:00
2013-10-09 08:48:49 +02:00
2015-09-30 18:34:27 -03:00
2015-09-30 18:34:27 -03:00
2013-11-07 10:40:47 -03:00
2015-10-02 15:28:16 -03:00
2015-08-06 16:49:01 -03:00
2013-02-14 16:12:34 -03:00
2015-10-02 15:59:23 -03:00
2015-09-15 09:48:32 -03:00
2015-09-14 12:50:16 -03:00
2015-09-04 12:43:44 -03:00
2015-09-30 18:34:37 -03:00
2015-05-08 16:26:26 -03:00
2015-05-05 18:13:22 -03:00
2015-05-05 18:13:22 -03:00
2015-08-08 14:16:49 -03:00
2015-10-07 19:41:50 -03:00
2013-10-14 10:28:48 -03:00
2013-10-14 10:28:48 -03:00
2015-08-17 11:08:37 -03:00
2014-08-15 10:58:35 -03:00
2015-10-01 09:54:33 -03:00
2015-10-01 09:54:33 -03:00
2015-02-12 17:55:18 -03:00
2015-10-06 18:04:59 -03:00
2015-10-06 18:04:59 -03:00
2015-09-02 16:30:46 -03:00
2015-07-28 12:05:04 -03:00
2015-09-16 18:01:03 -03:00
2015-08-08 14:16:49 -03:00
2013-12-27 17:08:19 -03:00
2015-05-04 12:43:54 -03:00
2015-05-04 12:43:54 -03:00
2015-07-06 10:21:46 -03:00
2015-07-20 14:51:07 -03:00
2015-07-20 14:51:07 -03:00
2015-06-25 15:15:50 -03:00
2014-07-10 00:22:54 +02:00
2015-09-25 10:45:50 -03:00
2015-03-24 12:08:43 -03:00
2015-09-30 18:34:30 -03:00
2015-09-14 12:50:29 -03:00
2015-03-24 12:08:30 -03:00
2013-12-04 13:46:37 -03:00
2015-07-21 07:58:06 +02:00
2015-06-26 11:07:01 -03:00
2015-06-19 16:03:33 -03:00
2015-06-19 16:03:33 -03:00
2015-08-19 14:15:09 -03:00
2015-05-18 10:17:33 -03:00
2015-07-23 22:51:13 -03:00
2013-12-19 14:43:45 -03:00
2014-05-01 21:22:39 +02:00
2015-09-04 12:00:45 -03:00
2015-07-23 22:51:11 -03:00
2015-07-23 22:51:11 -03:00
2015-04-02 13:18:41 -03:00
2015-09-15 09:48:33 -03:00
2015-09-28 17:09:12 -03:00
2014-07-23 11:48:11 -03:00
2014-07-23 11:48:11 -03:00
2014-10-29 10:32:46 -02:00
2014-02-24 09:29:36 -03:00
2015-06-16 10:40:03 -03:00
2014-10-29 10:32:46 -02:00
2015-10-05 17:59:43 -03:00
2015-09-14 12:50:15 -03:00
2013-12-27 17:08:19 -03:00
2014-05-01 21:22:39 +02:00
2015-07-07 11:05:08 -03:00
2015-05-29 12:43:44 -03:00
2012-09-11 12:19:15 -03:00
2015-06-16 10:34:39 -03:00
2015-06-16 10:34:39 -03:00
2014-11-05 10:11:26 -03:00