lkml.org 
[lkml]   [2010]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] perf, x86: use LBR for PEBS IP+1 fixup
Masami Hiramatsu wrote:
> Peter Zijlstra wrote:
>> On Thu, 2010-03-04 at 11:21 -0500, Masami Hiramatsu wrote:
>>> Peter Zijlstra wrote:
>>
>>>> +#define perf_misc_flags(regs) \
>>>> +({ int misc = 0; \
>>>> + if (user_mode(regs)) \
>>>> + misc |= PERF_RECORD_MISC_USER; \
>>>> + else \
>>>> + misc |= PERF_RECORD_MISC_KERNEL; \
>>>> + if (regs->flags & PERF_EFLAGS_EXACT) \
>>>> + misc |= PERF_RECORD_MISC_EXACT; \
>>>> + misc; })
>>>> +
>>>> +#define perf_instruction_pointer(regs) ((regs)->ip)
>>>
>>> Hmm, why don't you use instruction_pointer() defined in asm/ptrace.h?
>>> And I couldn't find any user of this macro in this patch...
>>
>> perf_instruction_pointer() is used in kernel/perf_event.c, and yeah I
>> could have used instruction_pointer() but that's yet another wrapper.
>>
>> Anyway, Yanmin is poking at doing kvm-guest profiling and will likely
>> rewrite all of the perf_misc() and perf_instruction_pointer() stuff
>> soon.
>
> Hmm, still I can't find where it is used (in your patches).

Ah, OK. that is already used in kernel/perf_event.c and
the patch overwrites one defined in include/linux/perf_event.h.

Reviewed-by: Masami Hiramatsu <mhiramat@redhat.com>

Thank you,


--
Masami Hiramatsu
e-mail: mhiramat@redhat.com


\
 
 \ /
  Last update: 2010-03-04 22:01    [W:0.055 / U:46.692 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site