From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
irogers@google.com, namhyung@kernel.org
Cc: atrajeev@linux.vnet.ibm.com, kjain@linux.ibm.com,
linux-perf-users@vger.kernel.org, maddy@linux.ibm.com,
disgoel@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/3] tools/erf/util/annotate: Set register_char and memory_ref_char for powerpc
Date: Sat, 9 Mar 2024 11:21:35 +0530 [thread overview]
Message-ID: <20240309055136.96556-3-atrajeev@linux.vnet.ibm.com> (raw)
In-Reply-To: <20240309055136.96556-1-atrajeev@linux.vnet.ibm.com>
To identify if the instruction has any memory reference,
"memory_ref_char" field needs to be set for specific architecture.
Example memory instruction:
lwz r10,0(r9)
Here "(" is the memory_ref_char. Set this as part of arch->objdump
To get register number and access offset from the given instruction,
arch->objdump.register_char is used. In case of powerpc, the register
char is "r" (since reg names are r0 to r31). Hence set register_char
as "r".
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
tools/perf/util/annotate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index ac002d907d81..d69bd6edafcb 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -216,6 +216,11 @@ static struct arch architectures[] = {
{
.name = "powerpc",
.init = powerpc__annotate_init,
+ .objdump = {
+ .comment_char = '#',
+ .register_char = 'r',
+ .memory_ref_char = '(',
+ },
},
{
.name = "riscv64",
--
2.43.0
next prev parent reply other threads:[~2024-03-09 5:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 5:51 [PATCH 0/3] Add data type profiling support for powerpc Athira Rajeev
2024-03-09 5:51 ` [PATCH 1/3] tools/perf/arch/powerpc: Add load/store in powerpc annotate instructions for data type profling Athira Rajeev
2024-03-09 7:18 ` Athira Rajeev
2024-03-09 5:51 ` Athira Rajeev [this message]
2024-03-09 5:51 ` [PATCH 3/3] tools/perf/arch/powerc: Add get_arch_regnum for powerpc Athira Rajeev
2024-03-09 7:25 [PATCH 0/3] Add data type profiling support " Athira Rajeev
2024-03-09 7:25 ` [PATCH 2/3] tools/erf/util/annotate: Set register_char and memory_ref_char " Athira Rajeev
2024-03-09 17:43 ` Segher Boessenkool
2024-03-18 11:33 ` Athira Rajeev
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=20240309055136.96556-3-atrajeev@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--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).