lkml.org 
[lkml]   [2018]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1]: perf/x86: store user space frame-pointer value on a sample
From
Date
On 06.04.2018 22:53, Andi Kleen wrote:
> On Fri, Apr 06, 2018 at 10:06:26PM +0300, Alexey Budankov wrote:
>> On 06.04.2018 18:31, Andi Kleen wrote:
>>>> diff --git a/arch/x86/kernel/perf_regs.c b/arch/x86/kernel/perf_regs.c
>>>> index e47b2dbbdef3..9284048cf5b0 100644
>>>> --- a/arch/x86/kernel/perf_regs.c
>>>> +++ b/arch/x86/kernel/perf_regs.c
>>>> @@ -157,6 +157,15 @@ void perf_get_regs_user(struct perf_regs *regs_user,
>>>> */
>>>> regs_user_copy->bx = -1;
>>>> regs_user_copy->bp = -1;
>>>> + if (user_64bit_mode(user_regs)) {
>>>
>>> Why is it 64bit only? Should work on 32bit too.
>>
>> bp register is a part of i386 syscall ABI
>> (http://man7.org/linux/man-pages/man2/syscall.2.html)
>> so not sure if it will make any sense for 32bit processes.
>
> Both 32bit and 64bit use the same frame pointer, if they
> use frame pointer.

Well let me check the same scenario for 32bit binary.
If the issue exists for it too and is fixed by the exposing bp
then it is obviously worth this improvement.

-Alexey

>
> -Andi
>

\
 
 \ /
  Last update: 2018-04-07 08:19    [W:0.052 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site