diff options
| -rw-r--r-- | include/linux/ftrace_event.h | 5 | ||||
| -rw-r--r-- | include/trace/ftrace.h | 4 | ||||
| -rw-r--r-- | kernel/trace/trace_events.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index ac8c6f8cf242..8544f121d9f1 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -112,8 +112,8 @@ struct ftrace_event_call { | |||
| 112 | struct dentry *dir; | 112 | struct dentry *dir; |
| 113 | struct trace_event *event; | 113 | struct trace_event *event; |
| 114 | int enabled; | 114 | int enabled; |
| 115 | int (*regfunc)(void); | 115 | int (*regfunc)(void *); |
| 116 | void (*unregfunc)(void); | 116 | void (*unregfunc)(void *); |
| 117 | int id; | 117 | int id; |
| 118 | int (*raw_init)(void); | 118 | int (*raw_init)(void); |
| 119 | int (*show_format)(struct trace_seq *s); | 119 | int (*show_format)(struct trace_seq *s); |
| @@ -122,6 +122,7 @@ struct ftrace_event_call { | |||
| 122 | int filter_active; | 122 | int filter_active; |
| 123 | struct event_filter *filter; | 123 | struct event_filter *filter; |
| 124 | void *mod; | 124 | void *mod; |
| 125 | void *data; | ||
| 125 | 126 | ||
| 126 | atomic_t profile_count; | 127 | atomic_t profile_count; |
| 127 | int (*profile_enable)(struct ftrace_event_call *); | 128 | int (*profile_enable)(struct ftrace_event_call *); |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 25d3b02a06f8..46d81b5e8610 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -568,7 +568,7 @@ static void ftrace_raw_event_##call(proto) \ | |||
| 568 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ | 568 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ |
| 569 | } \ | 569 | } \ |
| 570 | \ | 570 | \ |
| 571 | static int ftrace_raw_reg_event_##call(void) \ | 571 | static int ftrace_raw_reg_event_##call(void *ptr) \ |
| 572 | { \ | 572 | { \ |
| 573 | int ret; \ | 573 | int ret; \ |
| 574 | \ | 574 | \ |
| @@ -579,7 +579,7 @@ static int ftrace_raw_reg_event_##call(void) \ | |||
| 579 | return ret; \ | 579 | return ret; \ |
| 580 | } \ | 580 | } \ |
| 581 | \ | 581 | \ |
| 582 | static void ftrace_raw_unreg_event_##call(void) \ | 582 | static void ftrace_raw_unreg_event_##call(void *ptr) \ |
| 583 | { \ | 583 | { \ |
| 584 | unregister_trace_##call(ftrace_raw_event_##call); \ | 584 | unregister_trace_##call(ftrace_raw_event_##call); \ |
| 585 | } \ | 585 | } \ |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index f95f8470dd38..1d289e2d6693 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
| @@ -86,14 +86,14 @@ static void ftrace_event_enable_disable(struct ftrace_event_call *call, | |||
| 86 | if (call->enabled) { | 86 | if (call->enabled) { |
| 87 | call->enabled = 0; | 87 | call->enabled = 0; |
| 88 | tracing_stop_cmdline_record(); | 88 | tracing_stop_cmdline_record(); |
| 89 | call->unregfunc(); | 89 | call->unregfunc(call->data); |
| 90 | } | 90 | } |
| 91 | break; | 91 | break; |
| 92 | case 1: | 92 | case 1: |
| 93 | if (!call->enabled) { | 93 | if (!call->enabled) { |
| 94 | call->enabled = 1; | 94 | call->enabled = 1; |
| 95 | tracing_start_cmdline_record(); | 95 | tracing_start_cmdline_record(); |
| 96 | call->regfunc(); | 96 | call->regfunc(call->data); |
| 97 | } | 97 | } |
| 98 | break; | 98 | break; |
| 99 | } | 99 | } |
