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 <sw0312.kim@samsung.com>
Change-Id: I84edf124ba4443d70654242bca6f23e9242546cb
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)