Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath
From: Janani Ravichandran <hidden>
Date: 2016-08-07 10:36:25
Also in:
lkml
On Aug 5, 2016, at 10:00 PM, Steven Rostedt [off-list ref] wrote:quoted
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 :)
quoted
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!
quoted
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!
quoted
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
-- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>