[PATCH 0/3] ftrace: updates for tip

From: Steven Rostedt
Date: Wed Dec 03 2008 - 15:41:32 EST


This series has three patches.

The first patch adds a new feature that I've been wanting to have for some
time and Arjan even requested. That is to pick a function and only
trace that function and its children. Dynamic ftrace and function
graph needs to be enabled for this.

To do the above, I added a "trace" flags field in the task structure.
The second patch uses this for the ftrace pid code. It searches for
the task based on the pid and sets the trace flag, then in the
ftrace function caller it only needs to check this flag.

This means we can now trace more than one pid without any more overhead.
It also means that we should be able to use the name space code that
the container guys want us to. But since I'm not very up on the
namespace code, I'm still using just the normal 'pid'. I've Cc'd the
container folks so perhaps they could write up a patch for me ;-)

Note: When writing to the set_ftrace_pid two things happen.
- The task with the matching pid gets the trace flag set.
- Any other task has its trace flag cleared.
#2 needs to be addressed when converting to pid name spaces.
Just because it is not enough to simply find the matching task.
It may be good enough to just clear all tasks and then find the
one that matches.

The last patch makes the function graph tracer honor the set_ftrace_pid.

The following patches are in:


branch: tip/devel

Steven Rostedt (3):
ftrace: graph of a single function
ftrace: use task struct trace flag to filter on pid
ftrace: trace single pid for function graph tracer

include/linux/ftrace.h | 46 +++++++++
include/linux/sched.h | 4 +
kernel/trace/ftrace.c | 257 +++++++++++++++++++++++++++++++++++++++++++++++-
kernel/trace/trace.c | 11 ++
kernel/trace/trace.h | 40 +++++++-
5 files changed, 353 insertions(+), 5 deletions(-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/