ftrace: updates for tip
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ftrace: graph of a single functioninclude/ include/ kernel/ +2 more | +314 | 12 replies | |
| 2/3 | ftrace: use task struct trace flag to filter on pidkernel/ | +25 | 1 reply | |
| 3/3 | ftrace: trace single pid for function graph tracerkernel/ kernel/ kernel/ | +14 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] ftrace: updates for tip
Ingo,
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:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
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(-)