All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, acme@redhat.com,
	asharma@fb.com, ravitillo@lbl.gov, vweaver1@eecs.utk.edu,
	khandual@linux.vnet.ibm.com, dsahern@gmail.com
Subject: [PATCH 1/2] perf report: remove duplicate annotate choice in branch view mode
Date: Mon, 12 Mar 2012 16:13:29 +0100	[thread overview]
Message-ID: <1331565210-10865-2-git-send-email-eranian@google.com> (raw)
In-Reply-To: <1331565210-10865-1-git-send-email-eranian@google.com>

This patch removes the duplicated annotate selection when browsing
in branch view mode. If the sym and dso oof the branch source and
target are the same, then only one annotate choice is proposed.

Signed-off-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/util/ui/browsers/hists.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index 951e2e9..40fd424 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -989,6 +989,8 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 			    bi &&
 			    bi->to.sym != NULL &&
 			    !bi->to.map->dso->annotate_warned &&
+			    (bi->to.sym != bi->from.sym ||
+			     bi->to.map->dso != bi->from.map->dso) &&
 				asprintf(&options[nr_options], "Annotate %s",
 					 bi->to.sym->name) > 0)
 				annotate_t = nr_options++;
-- 
1.7.4.1


  reply	other threads:[~2012-03-12 15:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 15:13 [PATCH 0/2] perf report: fix branch view mode glitches Stephane Eranian
2012-03-12 15:13 ` Stephane Eranian [this message]
2012-03-13  4:50   ` [tip:perf/core] perf report: Remove duplicate annotate choice in branch view mode tip-bot for Stephane Eranian
2012-03-12 15:13 ` [PATCH 2/2] perf report: fix annotate double quit issue " Stephane Eranian
2012-03-13  4:51   ` [tip:perf/core] perf report: Fix " tip-bot for Stephane Eranian

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=1331565210-10865-2-git-send-email-eranian@google.com \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=asharma@fb.com \
    --cc=dsahern@gmail.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=ravitillo@lbl.gov \
    --cc=vweaver1@eecs.utk.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.