Commit 4056132e authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf hists browser: Offer non-symbol specific menu options for --sort without 'sym'

Now that we check more strictly what each of the menu entries need, we
can stop bailing out when 'sym' is not in the --sort order, instead we
let each option be added if what it needs is present.

This way, for instance, we can run scripts on all samples, see DSO map
details when 'dso' is in the --sort provided, etc.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1452960197-5323-9-git-send-email-namhyung@kernel.org
[ Carved out from a  larger patch ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d9695d9f
...@@ -2263,10 +2263,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -2263,10 +2263,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
continue; continue;
} }
if (!sort__has_sym) if (!sort__has_sym || browser->selection == NULL)
goto add_exit_option;
if (browser->selection == NULL)
goto skip_annotation; goto skip_annotation;
if (sort__mode == SORT_MODE__BRANCH) { if (sort__mode == SORT_MODE__BRANCH) {
...@@ -2333,7 +2330,6 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -2333,7 +2330,6 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
&options[nr_options], NULL, NULL); &options[nr_options], NULL, NULL);
nr_options += add_switch_opt(browser, &actions[nr_options], nr_options += add_switch_opt(browser, &actions[nr_options],
&options[nr_options]); &options[nr_options]);
add_exit_option:
nr_options += add_exit_opt(browser, &actions[nr_options], nr_options += add_exit_opt(browser, &actions[nr_options],
&options[nr_options]); &options[nr_options]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment