From: Seung-Woo Kim <sw0312.kim@samsung.com>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, will@kernel.org,
mark.rutland@arm.com, catalin.marinas@arm.com
Cc: sw0312.kim@samsung.com, sungguk.na@samsung.com
Subject: [PATCH] arm64: perf: Report arm pc registers for compat perf
Date: Tue, 12 Nov 2019 10:01:41 +0900 [thread overview]
Message-ID: <1573520501-29195-1-git-send-email-sw0312.kim@samsung.com> (raw)
In-Reply-To: CGME20191112005902epcas1p2d9dfa6a29f2c57669b1c1eb58517016d@epcas1p2.samsung.com
If perf is built as arm 32-bit, it only reads 15 registers as arm
32-bit register map and this breaks dwarf call-chain in compat
perf because pc register information is not filled.
Report arm pc registers for 32-bit compat perf.
Without this, arm 32-bit perf dwarf call-graph shows below
verbose message:
unwind: reg 15, val 0
unwind: reg 13, val ffbc6360
unwind: no map for 0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
arch/arm64/kernel/perf_regs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c
index 0bbac61..d4172e7 100644
--- a/arch/arm64/kernel/perf_regs.c
+++ b/arch/arm64/kernel/perf_regs.c
@@ -24,6 +24,8 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return regs->compat_sp;
if ((u32)idx == PERF_REG_ARM64_LR)
return regs->compat_lr;
+ if ((u32)idx == 15) /* PERF_REG_ARM_PC */
+ return regs->pc;
}
if ((u32)idx == PERF_REG_ARM64_SP)
--
1.7.4.1
next parent reply other threads:[~2019-11-12 1:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191112005902epcas1p2d9dfa6a29f2c57669b1c1eb58517016d@epcas1p2.samsung.com>
2019-11-12 1:01 ` Seung-Woo Kim [this message]
2019-11-12 9:40 ` [PATCH] arm64: perf: Report arm pc registers for compat perf Mark Rutland
2019-11-13 4:16 ` Seung-Woo Kim
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=1573520501-29195-1-git-send-email-sw0312.kim@samsung.com \
--to=sw0312.kim@samsung.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=sungguk.na@samsung.com \
--cc=will@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).