diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-19 07:02:50 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-19 07:02:50 +0800 |
| commit | 61b6b7fbda1bcef6d3df6b789e6bb178ee83d3d8 (patch) | |
| tree | ed23eb87f0b1152118985f93a5f19ef66629bb9e /tools/perf/builtin-list.c | |
| parent | 4c215fe8e288c87b34c3d5bc910c77af586859d2 (diff) | |
| parent | ec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff) | |
Merge 3.19-rc5 into tty-next
We want those tty fixes in that release in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/builtin-list.c')
| -rw-r--r-- | tools/perf/builtin-list.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 011195e38f21..198f3c3aff95 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c @@ -19,7 +19,9 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused) { int i; - const struct option list_options[] = { + bool raw_dump = false; + struct option list_options[] = { + OPT_BOOLEAN(0, "raw-dump", &raw_dump, "Dump raw events"), OPT_END() }; const char * const list_usage[] = { @@ -27,11 +29,18 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused) NULL }; + set_option_flag(list_options, 0, "raw-dump", PARSE_OPT_HIDDEN); + argc = parse_options(argc, argv, list_options, list_usage, PARSE_OPT_STOP_AT_NON_OPTION); setup_pager(); + if (raw_dump) { + print_events(NULL, true); + return 0; + } + if (argc == 0) { print_events(NULL, false); return 0; @@ -53,8 +62,6 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused) print_hwcache_events(NULL, false); else if (strcmp(argv[i], "pmu") == 0) print_pmu_events(NULL, false); - else if (strcmp(argv[i], "--raw-dump") == 0) - print_events(NULL, true); else { char *sep = strchr(argv[i], ':'), *s; int sep_idx; |
