mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiping Ma <Jiping.Ma2@windriver.com>
To: will.deacon@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: perf can not parser the backtrace of app in the 32bit system and 64bit kernel.
Date: Thu, 7 May 2020 09:10:03 +0800	[thread overview]
Message-ID: <3d84c09b-5072-0908-5df7-b1f6d19ed110@windriver.com> (raw)
In-Reply-To: <32a473bb-2760-b967-5d54-a22677b8018d@windriver.com>

Hi, Will

Please help to review the patch.

Thanks,
Jiping

On 04/29/2020 12:51 PM, Jiping Ma wrote:
> We test it as the following steps.
> # gcc -g -mthumb -gdwarf -o test test.c
> # export CALLGRAPH=dwarf
> #(./perftest ./test profiling 1; cd ./profiling/; perf script)
>
> Thanks,
> Jiping
>
> On 04/29/2020 12:01 PM, Jiping Ma wrote:
>> Record PC value from regs[15], it should be regs[32], which cause perf
>> parser the backtrace failed.
>>
>> Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
>> ---
>>   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];
>>   }
>


      reply	other threads:[~2020-05-07  1:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  4:01 Jiping Ma
2020-04-29  4:51 ` Jiping Ma
2020-05-07  1:10   ` Jiping Ma [this message]

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=3d84c09b-5072-0908-5df7-b1f6d19ed110@windriver.com \
    --to=jiping.ma2@windriver.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=will.deacon@arm.com \
    /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

all inboxes | Powered by JetHome®