Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo 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: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
4056132e d9695d9f

+1 -5
+1 -5
tools/perf/ui/browsers/hists.c
··· 2263 2263 continue; 2264 2264 } 2265 2265 2266 - if (!sort__has_sym) 2267 - goto add_exit_option; 2268 - 2269 - if (browser->selection == NULL) 2266 + if (!sort__has_sym || browser->selection == NULL) 2270 2267 goto skip_annotation; 2271 2268 2272 2269 if (sort__mode == SORT_MODE__BRANCH) { ··· 2330 2333 &options[nr_options], NULL, NULL); 2331 2334 nr_options += add_switch_opt(browser, &actions[nr_options], 2332 2335 &options[nr_options]); 2333 - add_exit_option: 2334 2336 nr_options += add_exit_opt(browser, &actions[nr_options], 2335 2337 &options[nr_options]); 2336 2338