From: Seung-Woo Kim Date: Wed, 11 Dec 2019 00:57:56 +0000 (+0900) Subject: [LOCAL] arm64: perf: Report arm pc registers for compat perf X-Git-Tag: submit/tizen/20191121.072817~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=865f4487ec93a231fde4599b23e7ce0500ef31c7;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git [LOCAL] arm64: perf: Report arm pc registers for compat perf 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 Posted to mainline[1] but never merged. [1]: https://patchwork.kernel.org/patch/11238463/ Signed-off-by: Seung-Woo Kim Change-Id: I84edf124ba4443d70654242bca6f23e9242546cb --- diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c index 6762ad70558..fd855f72721 100644 --- a/arch/arm64/kernel/perf_regs.c +++ b/arch/arm64/kernel/perf_regs.c @@ -22,6 +22,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)