Messages in this thread | | | From | Jiri Olsa <> | Subject | [RFC] ftrace, perf: Adding support to use function trace | Date | Sun, 27 Nov 2011 19:04:25 +0100 |
| |
hi, here's another version of perf support for function trace with filter. The changeset is working and hopefully is not introducing more bugs.. ;) still testing.
Patch 1 through 3 could be probably taken separately as they fix independent issues. The rest is specific to the perf function tracing.
I needed a way to temporarily enable/disable ftrace_ops based on the event in/out scheduling, patch 4/9 is introducing that. Not sure this is the best way though..
Also adding open/close, add/del registration actions for tracepoint (patches 5,6) to have suitable place to control the function trace.
Patch 7 enables the function event perf registration, and patches 8 and 9 add filter support.
attached patches: - 1/9 trace: Fix uninitialized variable compiler warning - 2/9 ftrace: Fix possible NULL dereferencing in __ftrace_hash_rec_update - 3/9 ftrace: Fix shutdown to disable calls properly - 4/9 ftrace: Add enable/disable ftrace_ops control interface - 5/9 ftrace, perf: Add open/close tracepoint perf registration actions - 6/9 ftrace, perf: Add add/del tracepoint perf registration actions - 7/9 ftrace, perf: Add support to use function tracepoint in perf - 8/9 ftrace, perf: Add FILTER_TRACE_FN event field type - 9/9 ftrace, perf: Add filter support for function trace event
thanks for comments, jirka --- include/linux/ftrace.h | 12 ++ include/linux/ftrace_event.h | 9 ++- include/linux/perf_event.h | 3 + kernel/trace/ftrace.c | 45 ++++++--- kernel/trace/trace.c | 3 +- kernel/trace/trace.h | 9 ++- kernel/trace/trace_event_perf.c | 208 ++++++++++++++++++++++++++++------- kernel/trace/trace_events.c | 12 ++- kernel/trace/trace_events_filter.c | 114 ++++++++++++++++++-- kernel/trace/trace_export.c | 53 ++++++++- kernel/trace/trace_kprobe.c | 8 ++- kernel/trace/trace_syscalls.c | 18 +++- 12 files changed, 413 insertions(+), 81 deletions(-)
| |