diff options
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 38cfb290ecd9..a88a3e0b0cc2 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -283,22 +283,6 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | |||
283 | } | 283 | } |
284 | 284 | ||
285 | static int | 285 | static int |
286 | ftrace_trace_onoff_unreg(char *glob, char *cmd, char *param) | ||
287 | { | ||
288 | struct ftrace_probe_ops *ops; | ||
289 | |||
290 | /* we register both traceon and traceoff to this callback */ | ||
291 | if (strcmp(cmd, "traceon") == 0) | ||
292 | ops = &traceon_probe_ops; | ||
293 | else | ||
294 | ops = &traceoff_probe_ops; | ||
295 | |||
296 | unregister_ftrace_function_probe_func(glob, ops); | ||
297 | |||
298 | return 0; | ||
299 | } | ||
300 | |||
301 | static int | ||
302 | ftrace_trace_onoff_callback(struct ftrace_hash *hash, | 286 | ftrace_trace_onoff_callback(struct ftrace_hash *hash, |
303 | char *glob, char *cmd, char *param, int enable) | 287 | char *glob, char *cmd, char *param, int enable) |
304 | { | 288 | { |
@@ -311,15 +295,17 @@ ftrace_trace_onoff_callback(struct ftrace_hash *hash, | |||
311 | if (!enable) | 295 | if (!enable) |
312 | return -EINVAL; | 296 | return -EINVAL; |
313 | 297 | ||
314 | if (glob[0] == '!') | ||
315 | return ftrace_trace_onoff_unreg(glob+1, cmd, param); | ||
316 | |||
317 | /* we register both traceon and traceoff to this callback */ | 298 | /* we register both traceon and traceoff to this callback */ |
318 | if (strcmp(cmd, "traceon") == 0) | 299 | if (strcmp(cmd, "traceon") == 0) |
319 | ops = &traceon_probe_ops; | 300 | ops = &traceon_probe_ops; |
320 | else | 301 | else |
321 | ops = &traceoff_probe_ops; | 302 | ops = &traceoff_probe_ops; |
322 | 303 | ||
304 | if (glob[0] == '!') { | ||
305 | unregister_ftrace_function_probe_func(glob+1, ops); | ||
306 | return 0; | ||
307 | } | ||
308 | |||
323 | if (!param) | 309 | if (!param) |
324 | goto out_reg; | 310 | goto out_reg; |
325 | 311 | ||