diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-05-08 16:27:41 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-05-08 16:30:26 -0400 |
commit | 4671c79408a3f8a5a6a45e39c4c164dada3a5678 (patch) | |
tree | c8cc041841afe9d2c1be14a2410c1f468b7477be /kernel | |
parent | 29f93943d1916d1a3faa3f10f4a06994347ac990 (diff) |
tracing: add trace_set_clr_event to export event enabling function
Other parts of the kernel may need to be able to enable or disable
specific events. Especially parts that create trace events.
[ Impact: allow enabling of trace events by those that create the event ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_events.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 2eecb87e42d3..0eec0c55dd87 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -177,6 +177,23 @@ static int ftrace_set_clr_event(char *buf, int set) | |||
177 | return __ftrace_set_clr_event(match, sub, event, set); | 177 | return __ftrace_set_clr_event(match, sub, event, set); |
178 | } | 178 | } |
179 | 179 | ||
180 | /** | ||
181 | * trace_set_clr_event - enable or disable an event | ||
182 | * @system: system name to match (NULL for any system) | ||
183 | * @event: event name to match (NULL for all events, within system) | ||
184 | * @set: 1 to enable, 0 to disable | ||
185 | * | ||
186 | * This is a way for other parts of the kernel to enable or disable | ||
187 | * event recording. | ||
188 | * | ||
189 | * Returns 0 on success, -EINVAL if the parameters do not match any | ||
190 | * registered events. | ||
191 | */ | ||
192 | int trace_set_clr_event(const char *system, const char *event, int set) | ||
193 | { | ||
194 | return __ftrace_set_clr_event(NULL, system, event, set); | ||
195 | } | ||
196 | |||
180 | /* 128 should be much more than enough */ | 197 | /* 128 should be much more than enough */ |
181 | #define EVENT_BUF_SIZE 127 | 198 | #define EVENT_BUF_SIZE 127 |
182 | 199 | ||