On Fri, May 8, 2020 at 3:10 AM Jiping Ma <[email protected]> wrote: > > > > > > > > -------- Forwarded Message -------- > > Subject: Re: [linux-yocto] [PATCH] perf: perf can not parser the > > backtrace of app in the 32bit system and 64bit kernel. > > Date: Sat, 2 May 2020 11:14:11 -0400 > > From: Bruce Ashfield <[email protected]> > > Reply-To: [email protected] > > To: Jiping Ma <[email protected]> > > CC: Yue Tao <[email protected]>, Robert Yang > > <[email protected]>, Development list for the linux-yocto > > repositories <[email protected]> > > > > > > > > What are the impacted kernel versions for this one ? > All kernel versions. the linux kernel upstream also has the issue.
merged to 5.2/5.4 and -dev Bruce > > Jiping > > > > Bruce > > > > On Wed, Apr 29, 2020 at 9:36 PM Jiping Ma <[email protected]> wrote: > >> Record PC value from regs[15], it should be regs[32], which cause perf > >> parser the backtrace failed. > >> > >> Signed-off-by: Jiping Ma <[email protected]> > >> --- > >> arch/arm64/kernel/perf_regs.c | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c > >> index 0bbac61..04088e6 100644 > >> --- a/arch/arm64/kernel/perf_regs.c > >> +++ b/arch/arm64/kernel/perf_regs.c > >> @@ -32,6 +32,10 @@ u64 perf_reg_value(struct pt_regs *regs, int idx) > >> if ((u32)idx == PERF_REG_ARM64_PC) > >> return regs->pc; > >> > >> + if (perf_reg_abi(current) == PERF_SAMPLE_REGS_ABI_32 > >> + && idx == 15) > >> + return regs->regs[PERF_REG_ARM64_PC]; > >> + > >> return regs->regs[idx]; > >> } > >> > >> -- > >> 1.9.1 > >> > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8650): https://lists.yoctoproject.org/g/linux-yocto/message/8650 Mute This Topic: https://lists.yoctoproject.org/mt/73936842/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
