diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-02-24 11:46:43 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-24 16:11:52 +0300 |
commit | 2ba7ac5814a6952aad647ce31696b893772cbe83 (patch) | |
tree | 6bb10b79498130edc544c6b4a0c25f3bb732dfbb /tools/perf/builtin-mem.c | |
parent | 54fbad54ebcde9db9c7459e9e379f2350c25e1f1 (diff) | |
download | linux-2ba7ac5814a6952aad647ce31696b893772cbe83.tar.xz |
perf mem: Introduce perf_mem_events__name function
Wrap perf_mem_events[].name into perf_mem_events__name() so we could alter the
events name if needed.
This will be handy when changing latency settings for loads event in following
patch.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1456303616-26926-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-mem.c')
-rw-r--r-- | tools/perf/builtin-mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index f1fa7b8d1f69..88aeac9aa1da 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c @@ -43,7 +43,7 @@ static int parse_record_events(const struct option *opt, fprintf(stderr, "%-13s%-*s%s\n", e->tag, verbose ? 25 : 0, - verbose ? e->name : "", + verbose ? perf_mem_events__name(j) : "", e->supported ? ": available" : ""); } exit(0); @@ -95,12 +95,12 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem) if (!perf_mem_events[j].supported) { pr_err("failed: event '%s' not supported\n", - perf_mem_events[j].name); + perf_mem_events__name(j)); return -1; } rec_argv[i++] = "-e"; - rec_argv[i++] = perf_mem_events[j].name; + rec_argv[i++] = perf_mem_events__name(j); }; for (j = 0; j < argc; j++, i++) |