lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] perf/core: allow ftrace for functions in kernel/event/core.c
Date


> On May 26, 2020, at 2:54 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Tue, May 26, 2020 at 09:46:29PM +0000, Song Liu wrote:
>>
>>
>>> On May 26, 2020, at 2:39 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>>>
>>> On Tue, May 26, 2020 at 02:28:26PM -0700, Song Liu wrote:
>>>> It is useful to trace functions in kernel/event/core.c. Allow ftrace for
>>>> them by removing $(CC_FLAGS_FTRACE) from Makefile.
>>>
>>> Did you try using the ftrace event with perf with this on?
>>
>> I have tried a few things, like
>>
>> perf stat -e probe:perf_read -I 1000
>> perf record -e probe:__x64_sys_perf_event_open -aR
>>
>> They all work fine.
>>
>> Do you have some tricky functions that we should double check?
>
> I've no idea what probe: does. iirc there's something like
> ftrace:function that is like regular function tracing.

Those are kprobes. I have CONFIG_HAVE_KPROBES_ON_FTRACE=y in .config.

>
> At some point using that made the kernel really sick due to recursion
> between ftrace and perf. Quite possibly that's been fixed, dunno.

I also tried on ctx_sched_out() and event_sched_out(). They also work
as expected.

Thanks,
Song

\
 
 \ /
  Last update: 2020-05-27 00:11    [W:0.104 / U:8.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site