diff options
author | Namhyung Kim <namhyung@kernel.org> | 2016-01-21 17:50:09 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-01-26 09:52:49 -0500 |
commit | c221acb0f970d3b80d72c812cda19c121acf5d52 (patch) | |
tree | a7b433cbd76d983b085790f42cf0d92128d6e61c /tools/perf/ui | |
parent | 2eafd410e669c744208f8110940e42caa7d79447 (diff) |
perf hists browser: Only offer symbol scripting when a symbol is under the cursor
When this feature was introduced a check was made if there was a
resolved symbol under the cursor, it got lost in commit ea7cd5923309
("perf hists browser: Split popup menu actions - part 2"), reinstate it.
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>
Fixes: ea7cd5923309 ("perf hists browser: Split popup menu actions - part 2")
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>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index e66b3a30dd9f..2801d80c6903 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -2322,10 +2322,12 @@ skip_annotation: | |||
2322 | * | 2322 | * |
2323 | * See hist_browser__show_entry. | 2323 | * See hist_browser__show_entry. |
2324 | */ | 2324 | */ |
2325 | nr_options += add_script_opt(browser, | 2325 | if (sort__has_sym && browser->selection->sym) { |
2326 | &actions[nr_options], | 2326 | nr_options += add_script_opt(browser, |
2327 | &options[nr_options], | 2327 | &actions[nr_options], |
2328 | NULL, browser->selection->sym); | 2328 | &options[nr_options], |
2329 | NULL, browser->selection->sym); | ||
2330 | } | ||
2329 | } | 2331 | } |
2330 | nr_options += add_script_opt(browser, &actions[nr_options], | 2332 | nr_options += add_script_opt(browser, &actions[nr_options], |
2331 | &options[nr_options], NULL, NULL); | 2333 | &options[nr_options], NULL, NULL); |