From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Borislav Petkov <bp@suse.de>, David Ahern <dsahern@gmail.com>,
Don Zickus <dzickus@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Stephane Eranian <eranian@google.com>
Subject: [PATCH 01/31] perf hists browser: Simplify symbol annotation menu setup
Date: Thu, 19 Mar 2015 14:04:37 -0300 [thread overview]
Message-ID: <1426784707-19466-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1426784707-19466-1-git-send-email-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
No need to repeat some tests, skip annotation instead.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-6h6igrb81u4e6rwfmx7dv47n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/hists.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 49eddeb81458..f69371b7f49b 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1612,19 +1612,22 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
if (!sort__has_sym)
goto add_exit_option;
+ if (browser->selection == NULL)
+ goto skip_annotation;
+
if (sort__mode == SORT_MODE__BRANCH) {
bi = browser->he_selection->branch_info;
- if (browser->selection != NULL &&
- bi &&
- bi->from.sym != NULL &&
+
+ if (bi == NULL)
+ goto skip_annotation;
+
+ if (bi->from.sym != NULL &&
!bi->from.map->dso->annotate_warned &&
asprintf(&options[nr_options], "Annotate %s",
bi->from.sym->name) > 0)
annotate_f = nr_options++;
- if (browser->selection != NULL &&
- bi &&
- bi->to.sym != NULL &&
+ if (bi->to.sym != NULL &&
!bi->to.map->dso->annotate_warned &&
(bi->to.sym != bi->from.sym ||
bi->to.map->dso != bi->from.map->dso) &&
@@ -1632,8 +1635,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
bi->to.sym->name) > 0)
annotate_t = nr_options++;
} else {
- if (browser->selection != NULL &&
- browser->selection->sym != NULL &&
+ if (browser->selection->sym != NULL &&
!browser->selection->map->dso->annotate_warned) {
struct annotation *notes;
@@ -1645,7 +1647,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
annotate = nr_options++;
}
}
-
+skip_annotation:
if (thread != NULL &&
asprintf(&options[nr_options], "Zoom %s %s(%d) thread",
(browser->hists->thread_filter ? "out of" : "into"),
--
1.9.3
next prev parent reply other threads:[~2015-03-19 17:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 17:04 [GIT PULL 00/31] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-03-19 17:04 ` Arnaldo Carvalho de Melo [this message]
2015-03-19 17:04 ` [PATCH 02/31] perf hists browser: Fix up some branch alignment Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 03/31] perf hists: Remove hist_entry->used, not used anymore Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 04/31] perf hists browser: Allow annotating entries in callchains Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 05/31] perf tools: Fix building error for arm64 Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 06/31] perf build: Disable default check for libbabeltrace Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 07/31] perf build: Move features build output under features directory Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 08/31] perf build: Fix pthread-attr-setaffinity-np include in test-all Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 09/31] perf build: Get rid of LIB_INCLUDE variable Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 10/31] perf build: Rename CORE_FEATURE_TESTS to FEATURE_TESTS Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 11/31] perf build: Get rid of VF_FEATURE_TESTS Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 12/31] perf build: Rename display_lib into feature_display Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 13/31] perf build: Rename display_vf to feature_verbose Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 14/31] perf build: Rename PERF-FEATURES into FEATURE-DUMP Arnaldo Carvalho de Melo
2015-03-22 10:19 ` Ingo Molnar
2015-03-23 10:57 ` Jiri Olsa
2015-03-23 14:13 ` Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 15/31] perf build: Rename feature_print_var_code to print_var_code Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 17/31] perf tools: Fix the bash completion for listing options of perf subcommand Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 18/31] perf tools: Fix the bash completion for listing subsubcommands " Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 19/31] perf tools: Provide the right bash completion for listing options of perf subcommand subsubcommand Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 20/31] perf tools: Fix the bash completion for listing events of perf subcommand record|stat|top -e Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 21/31] perf tools: Fix the bash completion to support listing events for --event Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 22/31] perf tools: Fix the bash completion for listing subcommands of perf Arnaldo Carvalho de Melo
2015-03-19 17:04 ` [PATCH 23/31] perf tools: Add the bash completion for listing subsubcommands of perf data Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 24/31] perf tools: Add the bash completion for listing subsubcommands of perf help Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 25/31] perf tools: Add the bash completion for listing subsubcommands of perf script Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 26/31] perf tools: Add the bash completion for listing subsubcommands of perf test Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 27/31] perf tools: Add the bash completion for listing subsubcommands of perf timechart Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 28/31] perf tools: Add the bash completion for listing subsubcommands of perf trace Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 29/31] perf tools: Avoid confusion with preloaded bash function for perf bash completion Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 30/31] perf callchain: Separate eh/debug frame offset cache Arnaldo Carvalho de Melo
2015-03-19 17:05 ` [PATCH 31/31] perf report: Don't allow empty argument for '-t' Arnaldo Carvalho de Melo
2015-03-22 9:55 ` [GIT PULL 00/31] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426784707-19466-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=bp@suse.de \
--cc=dsahern@gmail.com \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).