diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-02-19 11:44:01 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-19 19:12:51 -0300 |
commit | 43d0b97817a41b274aaec0476e912dae3ae1f93d (patch) | |
tree | f865dd5a4fce34a7ad911bdfb30ee91f80c859d9 /tools/perf/util/parse-events.h | |
parent | 10bf358a1b79fa1311eb05ee31f2cefdcad01741 (diff) | |
download | lwn-43d0b97817a41b274aaec0476e912dae3ae1f93d.tar.gz lwn-43d0b97817a41b274aaec0476e912dae3ae1f93d.zip |
perf tools: Enable config and setting names for legacy cache events
This patch allows setting config terms for legacy cache events.
For example:
# perf stat -e L1-icache-misses/name=valA/ -e branches/name=valB/ ls
...
Performance counter stats for 'ls':
11299 valA
451605 valB
0.000779091 seconds time elapsed
# perf record -e cache-misses/name=inh/ -e cache-misses/name=noinh,no-inherit/ bash
# ls
# exit
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.023 MB perf.data (131 samples) ]
# perf report --stdio | grep -B 1 'Event count'
# Samples: 105 of event 'inh'
# Event count (approx.): 109118
--
# Samples: 26 of event 'noinh'
# Event count (approx.): 48302
A test case is introduced to test this feature.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
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: Jiri Olsa <jolsa@kernel.org>
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-14-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r-- | tools/perf/util/parse-events.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 76151f9f00d2..d5eb2af78826 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -140,7 +140,9 @@ int parse_events_add_numeric(struct parse_events_evlist *data, u32 type, u64 config, struct list_head *head_config); int parse_events_add_cache(struct list_head *list, int *idx, - char *type, char *op_result1, char *op_result2); + char *type, char *op_result1, char *op_result2, + struct parse_events_error *error, + struct list_head *head_config); int parse_events_add_breakpoint(struct list_head *list, int *idx, void *ptr, char *type, u64 len); int parse_events_add_pmu(struct parse_events_evlist *data, |