diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-01-22 18:09:47 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-31 13:07:49 -0300 |
commit | e6ab07d027d47e55d8a5c0f33b16dfdd3e18c96f (patch) | |
tree | e53b70cb5b0517e1783cd10f888b775a4d8f25f3 /tools/perf/builtin-evlist.c | |
parent | 00c7e1f10c6b8ae8a031f5c6a58ecd15d20c52cb (diff) |
perf evlist: Add --group option
Add '-g/--group' option for showing event groups. For simplicity it is
currently not compatible with other options.
$ perf evlist --group
{ref-cycles,cycles}
$ perf evlist
ref-cycles
cycles
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1358845787-1350-20-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-evlist.c')
-rw-r--r-- | tools/perf/builtin-evlist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c index 1312a5e03ec7..85a5e35dd147 100644 --- a/tools/perf/builtin-evlist.c +++ b/tools/perf/builtin-evlist.c @@ -39,6 +39,8 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"), OPT_BOOLEAN('v', "verbose", &details.verbose, "Show all event attr details"), + OPT_BOOLEAN('g', "group", &symbol_conf.event_group, + "Show event group information"), OPT_END() }; const char * const evlist_usage[] = { @@ -50,5 +52,10 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) if (argc) usage_with_options(evlist_usage, options); + if (symbol_conf.event_group && (details.verbose || details.freq)) { + pr_err("--group option is not compatible with other options\n"); + usage_with_options(evlist_usage, options); + } + return __cmd_evlist(input_name, &details); } |