]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
tracing/events: Add ftrace_event_call param to define_fields()
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 19 Aug 2009 07:53:52 +0000 (15:53 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 19 Aug 2009 13:02:23 +0000 (15:02 +0200)
This parameter is needed by syscall events to add define_fields()
handler.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A8BAF90.6060801@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/ftrace_event.h
include/trace/ftrace.h
kernel/trace/trace_events.c
kernel/trace/trace_export.c

index 189806b6e69e3cce5819266786d59dbaba88150b..35b3a4a5ba861e5e7710d2015619aaa39cbfe217 100644 (file)
@@ -118,7 +118,7 @@ struct ftrace_event_call {
        int                     (*raw_init)(void);
        int                     (*show_format)(struct ftrace_event_call *call,
                                               struct trace_seq *s);
-       int                     (*define_fields)(void);
+       int                     (*define_fields)(struct ftrace_event_call *);
        struct list_head        fields;
        int                     filter_active;
        struct event_filter     *filter;
index b250b06165715c7559aaac7c7d536000749c3e0f..4e81c9b37515a225b978f5c811ec19c0dd9ad50d 100644 (file)
@@ -294,10 +294,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags)   \
 #undef TRACE_EVENT
 #define TRACE_EVENT(call, proto, args, tstruct, func, print)           \
 int                                                                    \
-ftrace_define_fields_##call(void)                                      \
+ftrace_define_fields_##call(struct ftrace_event_call *event_call)      \
 {                                                                      \
        struct ftrace_raw_##call field;                                 \
-       struct ftrace_event_call *event_call = &event_##call;           \
        int ret;                                                        \
                                                                        \
        __common_field(int, type, 1);                                   \
index b568ade8f453c3a7fbe019f3258f0f6ba5e2a2aa..af8fb8ebef0bdfb4fe066122b794894d9cd6352b 100644 (file)
@@ -941,7 +941,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
                                          id);
 
        if (call->define_fields) {
-               ret = call->define_fields();
+               ret = call->define_fields(call);
                if (ret < 0) {
                        pr_warning("Could not initialize trace point"
                                   " events/%s\n", call->name);
index 956d4bc675e5f99dbd281fcdadae14a0114a206f..cf2c752a25bf0d5216704d59e04cbfd80fb8423c 100644 (file)
@@ -119,7 +119,7 @@ ftrace_format_##call(struct ftrace_event_call *unused,                      \
 
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
-int ftrace_define_fields_##call(void);                                 \
+int ftrace_define_fields_##call(struct ftrace_event_call *event_call); \
 static int ftrace_raw_init_event_##call(void);                         \
                                                                        \
 struct ftrace_event_call __used                                                \
@@ -184,9 +184,8 @@ __attribute__((section("_ftrace_events"))) event_##call = {         \
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
 int                                                                    \
-ftrace_define_fields_##call(void)                                      \
+ftrace_define_fields_##call(struct ftrace_event_call *event_call)      \
 {                                                                      \
-       struct ftrace_event_call *event_call = &event_##call;           \
        struct args field;                                              \
        int ret;                                                        \
                                                                        \