diff options
-rw-r--r-- | include/linux/ftrace_event.h | 8 | ||||
-rw-r--r-- | kernel/trace/trace_event_profile.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_events.c | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 5c093ffc655b..d7cd193c2277 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -119,11 +119,9 @@ struct ftrace_event_call { | |||
119 | void *filter; | 119 | void *filter; |
120 | void *mod; | 120 | void *mod; |
121 | 121 | ||
122 | #ifdef CONFIG_EVENT_PROFILE | 122 | atomic_t profile_count; |
123 | atomic_t profile_count; | 123 | int (*profile_enable)(struct ftrace_event_call *); |
124 | int (*profile_enable)(struct ftrace_event_call *); | 124 | void (*profile_disable)(struct ftrace_event_call *); |
125 | void (*profile_disable)(struct ftrace_event_call *); | ||
126 | #endif | ||
127 | }; | 125 | }; |
128 | 126 | ||
129 | #define MAX_FILTER_PRED 32 | 127 | #define MAX_FILTER_PRED 32 |
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c index 5b5895afecfe..11ba5bb4ed0a 100644 --- a/kernel/trace/trace_event_profile.c +++ b/kernel/trace/trace_event_profile.c | |||
@@ -14,7 +14,7 @@ int ftrace_profile_enable(int event_id) | |||
14 | 14 | ||
15 | mutex_lock(&event_mutex); | 15 | mutex_lock(&event_mutex); |
16 | list_for_each_entry(event, &ftrace_events, list) { | 16 | list_for_each_entry(event, &ftrace_events, list) { |
17 | if (event->id == event_id) { | 17 | if (event->id == event_id && event->profile_enable) { |
18 | ret = event->profile_enable(event); | 18 | ret = event->profile_enable(event); |
19 | break; | 19 | break; |
20 | } | 20 | } |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 23d2972b22d6..e75276a49cf5 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
940 | entry = trace_create_file("enable", 0644, call->dir, call, | 940 | entry = trace_create_file("enable", 0644, call->dir, call, |
941 | enable); | 941 | enable); |
942 | 942 | ||
943 | if (call->id) | 943 | if (call->id && call->profile_enable) |
944 | entry = trace_create_file("id", 0444, call->dir, call, | 944 | entry = trace_create_file("id", 0444, call->dir, call, |
945 | id); | 945 | id); |
946 | 946 | ||