lkml.org 
[lkml]   [2016]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath
From
Date

> On Aug 5, 2016, at 10:00 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>
>>
>
> You probably want to clear the trace here, or set function_graph here
> first. Because the function graph starts writing to the buffer
> immediately.
>

I did that, just didn’t include it here :)
>>
>
> When threshold is set, the entry is not recorded, because it is only
> showing the exit and the time it took in that function:
>
> 0) kswapd0-52 | + 54.141 us | } /* shrink_zone */
>
> shrink_zone() took 54.141us.
>
> The reason it doesn't record the entry is because it would fill the
> entire buffer, if the threshold is never hit. One can't predict the
> time in a function when you first enter that function.

Right!
>
>>
>
> You need your own interpreter here. Perhaps a module that either reads
> the tracepoints directly and registers a function graph tracer itself.
> The trace events and function tracers are plugable. You don't need to
> use the tracing system to use them. Just hook into them directly.
>
> Things like the wakeup latency tracer does this. Look at
> kernel/trace/trace_sched_wakeup.c for an example. It hooks into the
> sched_wakeup and sched_switch tracepoints, and also has a way to use
> function and function_graph tracing.
>
>

I will look at that file. Thanks!
>
>>
>
> Great! And note, even if you add extra tracepoints, you can hook
> directly into them too. Again, see the trace_sched_wakeup.c for
> examples.

Alright. Thanks for all the help! :)

Janani.
>
> -- Steve

\
 
 \ /
  Last update: 2016-08-07 13:21    [W:0.093 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site