From: Steven Rostedt <srostedt@redhat.com>
Multiple events may use the same method to print their data.
Instead of having all events have a pointer to their print funtions,
the trace_event structure now points to a trace_event_functions structure
that will hold the way to print ouf the event.
The event itself is now passed to the print function to let the print
function know what kind of event it should print.
This opens the door to consolidating the way several events print
their output.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/ftrace_event.h | 17 +++-
include/linux/syscalls.h | 10 ++-
include/trace/ftrace.h | 12 ++-
include/trace/syscall.h | 6 +-
kernel/trace/blktrace.c | 13 ++-
kernel/trace/kmemtrace.c | 28 +++++--
kernel/trace/trace.c | 9 +-
kernel/trace/trace_functions_graph.c | 2 +-
kernel/trace/trace_kprobe.c | 22 ++++--
kernel/trace/trace_output.c | 137 +++++++++++++++++++++++-----------
kernel/trace/trace_output.h | 2 +-
kernel/trace/trace_syscalls.c | 6 +-
12 files changed, 178 insertions(+), 86 deletions(-)
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 655de69..09c2ad7 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -70,18 +70,25 @@ struct trace_iterator {
};
+struct trace_event;
+
typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter,
- int flags);
-struct trace_event {
- struct hlist_node node;
- struct list_head list;
- int type;
+ int flags, struct trace_event *event);
+
+struct trace_event_functions {
trace_print_func trace;
trace_print_func raw;
trace_print_func hex;
trace_print_func binary;
};
+struct trace_event {
+ struct hlist_node node;
+ struct list_head list;
+ int type;
+ struct ...