Wang Nan
10bf358a1b
perf tools: Enable config raw and numeric events
This patch allows setting config terms for raw and numeric events.
For example:
# perf stat -e cycles/name=cyc/ ls
...
1821108 cyc
...
# perf stat -e r6530160/name=event/ ls
...
1103195 event
...
# perf record -e cycles -e 4:0x6530160/name=evtx,call-graph=fp/ -a sleep 1
...
# perf report --stdio
...
# Samples: 124 of event 'cycles'
46.61% 0.00% swapper [kernel.vmlinux] [k] cpu_startup_entry
41.26% 0.00% swapper [kernel.vmlinux] [k] start_secondary
...
# Samples: 91 of event 'evtx'
...
93.76% 0.00% swapper [kernel.vmlinux] [k] cpu_startup_entry
|
---cpu_startup_entry
|
|--66.63%--call_cpuidle
| cpuidle_enter
| |
...
3 test cases are introduced to test config terms for symbol, raw and
numeric events.
Committer note:
Further testing shows that we can retrieve the event name using 'perf
evlist -v' and looking at the 'config' perf_event_attr field, i.e.:
# perf record -e cycles -e 4:0x6530160/name=evtx,call-graph=fp/ -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.724 MB perf.data (2076 samples) ]
# perf evlist
cycles
evtx
# perf evlist -v
cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
evtx: type: 4, size: 112, config: 0x6530160, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, freq: 1, sample_id_all: 1, exclude_guest: 1
#
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Cody P Schafer <dev@codyps.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jeremie Galarneau <jeremie.galarneau@efficios.com>
Cc: Kirill Smelkov <kirr@nexedi.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1455882283-79592-13-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-02-19 19:12:50 -03:00
..
2015-04-08 10:49:53 -03:00
2016-01-26 12:10:55 -03:00
2015-12-17 14:27:14 -03:00
2015-01-21 13:24:31 -03:00
2015-11-19 13:19:15 -03:00
2016-02-15 17:33:26 -03:00
2015-11-06 17:49:24 -03:00
2015-11-06 17:49:50 -03:00
2015-11-18 17:51:04 -03:00
2016-01-26 12:10:55 -03:00
2016-01-29 17:25:43 -03:00
2016-01-26 12:10:55 -03:00
2015-12-17 15:11:10 -03:00
2016-02-19 19:12:44 -03:00
2015-12-17 14:38:18 -03:00
2015-11-19 13:19:15 -03:00
2015-12-07 18:12:54 -03:00
2015-12-17 15:13:38 -03:00
2015-12-07 18:12:56 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2016-01-11 19:22:22 -03:00
2014-06-01 14:35:11 +02:00
2016-02-03 11:13:11 -03:00
2016-02-03 11:13:11 -03:00
2016-01-11 19:22:22 -03:00
2016-02-03 11:13:11 -03:00
2016-01-08 14:15:43 -03:00
2015-11-19 13:19:15 -03:00
2016-01-26 12:10:55 -03:00
2016-01-26 12:10:55 -03:00
2016-02-05 09:46:45 -03:00
2015-11-19 13:19:15 -03:00
2015-12-07 18:12:54 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2016-02-19 19:12:50 -03:00
2015-11-19 13:19:15 -03:00
2016-01-07 13:20:22 -03:00
2014-01-13 10:06:26 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2015-12-17 14:55:44 -03:00
2015-11-19 13:19:15 -03:00
2016-01-08 14:15:43 -03:00
2015-11-19 13:19:15 -03:00
2015-12-17 15:11:10 -03:00
2015-12-17 14:38:16 -03:00
2015-11-19 13:19:15 -03:00
2015-11-19 13:19:15 -03:00
2016-01-26 11:52:52 -03:00