diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-12-11 08:47:25 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-12-11 08:47:25 +0100 |
commit | 54c9238cfd495d234b0e02fa7dcce5b1671a42dd (patch) | |
tree | e72b7bd3620c5d949fbd7f8efe8fb0a3b03e02bf /tools/perf/builtin-annotate.c | |
parent | d18929e9fde30c4d57ae57eb9a7f6f10b5808ca1 (diff) | |
parent | e7a7865cc0da306542db0b9205cb0a467f59e33d (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core refactorings and fixes from Arnaldo Carvalho de Melo:
Infrastructure changes:
- Revert "perf tools: Improve setting of gcc debug option", -Og is broken,
GCC PR created (Jiri Olsa)
- More reference count fixes (Masami Hiramatsu)
- Untangle browser setup (--stdio, --tui, etc) from argument checking,
prep work to move the usage() code out of tools/perf for use by
other tools/ living utilities (Namhyung Kim)
- Delete half-processed hist entries when exiting 'perf top' (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-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 2bf9b3fd9e61..1f00dc7cecba 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -343,18 +343,19 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) return ret; argc = parse_options(argc, argv, options, annotate_usage, 0); + if (argc) { + /* + * Special case: if there's an argument left then assume that + * it's a symbol filter: + */ + if (argc > 1) + usage_with_options(annotate_usage, options); - if (annotate.use_stdio) - use_browser = 0; - else if (annotate.use_tui) - use_browser = 1; - else if (annotate.use_gtk) - use_browser = 2; + annotate.sym_hist_filter = argv[0]; + } file.path = input_name; - setup_browser(true); - annotate.session = perf_session__new(&file, false, &annotate.tool); if (annotate.session == NULL) return -1; @@ -369,16 +370,14 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) if (setup_sorting() < 0) usage_with_options(annotate_usage, options); - if (argc) { - /* - * Special case: if there's an argument left then assume that - * it's a symbol filter: - */ - if (argc > 1) - usage_with_options(annotate_usage, options); + if (annotate.use_stdio) + use_browser = 0; + else if (annotate.use_tui) + use_browser = 1; + else if (annotate.use_gtk) + use_browser = 2; - annotate.sym_hist_filter = argv[0]; - } + setup_browser(true); ret = __cmd_annotate(&annotate); |