linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	acme@kernel.org
Cc: peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, treeze.taeung@gmail.com,
	naveen.n.rao@linux.vnet.ibm.com, markus@trippelsdorf.de,
	chris.ryder@arm.com, pawel.moll@arm.com, mhiramat@kernel.org,
	rmk+kernel@arm.linux.org.uk, jolsa@kernel.org,
	mpe@ellerman.id.au, hemant@linux.vnet.ibm.com,
	namhyung@kernel.org,
	Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Subject: [PATCH v5 5/7] perf annotate: Show raw form for jump instruction with indirect target
Date: Fri, 19 Aug 2016 10:59:04 +0530	[thread overview]
Message-ID: <1471584546-11080-6-git-send-email-ravi.bangoria@linux.vnet.ibm.com> (raw)
In-Reply-To: <1471584546-11080-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>

For jump instructions that does not include target address as direct
operand, use raw value for that. This is needed for certain powerpc
jump instructions that use target address in a register (such as bctr,
btar, ...).

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
Changes in v5:
  - New patch introduced to annotate jump instruction with indirect target

 tools/perf/util/annotate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 6368ba9..4a4a583 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -131,6 +131,9 @@ static int jump__parse(struct ins_operands *ops,
 static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
 			   struct ins_operands *ops)
 {
+	if (!ops->target.addr)
+		return ins__raw_scnprintf(ins, bf, size, ops);
+
 	return scnprintf(bf, size, "%-6.6s %" PRIx64, ins->name, ops->target.offset);
 }
 
-- 
2.5.5

  parent reply	other threads:[~2016-08-19  5:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  5:28 [PATCH v5 0/7] perf: Cross arch annotate + few miscellaneous fixes Ravi Bangoria
2016-08-19  5:29 ` [PATCH v5 1/7] perf: Define macro for normalized arch names Ravi Bangoria
2016-08-19  5:29 ` [PATCH v5 2/7] perf annotate: Add cross arch annotate support Ravi Bangoria
2016-08-19  7:50   ` Russell King - ARM Linux
2016-08-19 10:39     ` Ravi Bangoria
2016-08-19 10:48       ` Russell King - ARM Linux
2016-08-19 11:33         ` Ravi Bangoria
2016-08-19  5:29 ` [PATCH v5 3/7] perf annotate: Add support for powerpc Ravi Bangoria
2016-08-19  5:29 ` [PATCH v5 4/7] perf annotate: Do not ignore call instruction with indirect target Ravi Bangoria
2016-08-19  5:29 ` Ravi Bangoria [this message]
2016-08-19  5:29 ` [PATCH v5 6/7] perf annotate: Support jump instruction with target as second operand Ravi Bangoria
2016-08-19  5:29 ` [PATCH v5 7/7] perf annotate: Fix jump target outside of function address range Ravi Bangoria

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=1471584546-11080-6-git-send-email-ravi.bangoria@linux.vnet.ibm.com \
    --to=ravi.bangoria@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=chris.ryder@arm.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=markus@trippelsdorf.de \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=pawel.moll@arm.com \
    --cc=peterz@infradead.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=treeze.taeung@gmail.com \
    /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).