[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/5][RFC] [RFC] function profiler

* Steven Rostedt <> wrote:

> The following patches are RFC, and to discuss is this work would
> be useful.
> This patch series adds a function profiler hook to the function
> tracer and function graph tracer. That is, it uses the mcount
> calls to track the functions being called. Now with the function
> graph tracer it also keeps track of the times the functions have
> been executing.
> Note, this is similar to oprofile, but is not a sampling approach,
> but a true recorder. Of course, by recording every function the
> overhead compared to oprofile is higher. With the use of dynamic
> ftrace, you could just trace certain functions, or just a certain
> module. The flexibility is a bit greater with this profiling.

Also, with the built-in user-defined filter code in the latest
tracing tree this can also be used to only trace a given PID, or a
range of PIDs.

Or we can trace preempt-disabled functions only, via this filter

echo 'common_preempt_count != 0' > /debug/tracing/events/ftrace/function/filter

Or (future planned) we can profile functions only taking longer than
100 microseconds:

echo 'duration >= 0' > /debug/tracing/events/ftrace/function/filter

There are other possibilities as well.


 \ /
  Last update: 2009-03-25 10:55    [W:0.141 / U:0.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site