diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-01-08 08:59:22 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-01-08 08:59:22 +0100 |
commit | ed9eb845d7916b2bc863e5b93c82e18be8faf032 (patch) | |
tree | ebe481d3b6ff539f6e9837426bf472b0296521e2 /tools/perf/builtin-list.c | |
parent | 5b5e76218fbdbb71a01d5480f289ead624232876 (diff) | |
parent | e7024fc3783317608b8e07048116a72a7d1cd26d (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
"
- 'perf probe' should fall back to find probe point in symbols when failing
to do so in a debuginfo file (Masami Hiramatsu)
- Fix 'perf probe' crash in dwarf_getcfi_elf (Namhyung Kim)
- Fix shell completion with 'perf list' --raw-dump option (Taesoo Kim)
- Fix 'perf diff' to sort by baseline field by default (Namhyung Kim)
"
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.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 011195e38f2..198f3c3aff9 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; |