diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-02-17 12:32:04 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-17 12:32:04 -0500 |
commit | b6887d7916e44c1d8913084fb6aa5004d9473f1a (patch) | |
tree | 3446baa5592ce9ce17abb51ffdf3d89e6b52ef9b /kernel/trace/trace_functions.c | |
parent | 6a24a244cd3a02d5b290293c32fcf2c6e92b4235 (diff) |
ftrace: rename _hook to _probe
Impact: clean up
Ingo Molnar did not like the _hook naming convention used by the
select function tracer. Luis Claudio R. Goncalves suggested using
the "_probe" extension. This patch implements the change of
calling the functions and variables "_hook" and replacing them
with "_probe".
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 021a574c5988..6ea73ed03bfa 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -269,21 +269,21 @@ ftrace_traceoff(unsigned long ip, unsigned long parent_ip, void **data) | |||
269 | 269 | ||
270 | static int | 270 | static int |
271 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | 271 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, |
272 | struct ftrace_hook_ops *ops, void *data); | 272 | struct ftrace_probe_ops *ops, void *data); |
273 | 273 | ||
274 | static struct ftrace_hook_ops traceon_hook_ops = { | 274 | static struct ftrace_probe_ops traceon_probe_ops = { |
275 | .func = ftrace_traceon, | 275 | .func = ftrace_traceon, |
276 | .print = ftrace_trace_onoff_print, | 276 | .print = ftrace_trace_onoff_print, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static struct ftrace_hook_ops traceoff_hook_ops = { | 279 | static struct ftrace_probe_ops traceoff_probe_ops = { |
280 | .func = ftrace_traceoff, | 280 | .func = ftrace_traceoff, |
281 | .print = ftrace_trace_onoff_print, | 281 | .print = ftrace_trace_onoff_print, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | static int | 284 | static int |
285 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | 285 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, |
286 | struct ftrace_hook_ops *ops, void *data) | 286 | struct ftrace_probe_ops *ops, void *data) |
287 | { | 287 | { |
288 | char str[KSYM_SYMBOL_LEN]; | 288 | char str[KSYM_SYMBOL_LEN]; |
289 | long count = (long)data; | 289 | long count = (long)data; |
@@ -291,7 +291,7 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | |||
291 | kallsyms_lookup(ip, NULL, NULL, NULL, str); | 291 | kallsyms_lookup(ip, NULL, NULL, NULL, str); |
292 | seq_printf(m, "%s:", str); | 292 | seq_printf(m, "%s:", str); |
293 | 293 | ||
294 | if (ops == &traceon_hook_ops) | 294 | if (ops == &traceon_probe_ops) |
295 | seq_printf(m, "traceon"); | 295 | seq_printf(m, "traceon"); |
296 | else | 296 | else |
297 | seq_printf(m, "traceoff"); | 297 | seq_printf(m, "traceoff"); |
@@ -306,15 +306,15 @@ ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | |||
306 | static int | 306 | static int |
307 | ftrace_trace_onoff_unreg(char *glob, char *cmd, char *param) | 307 | ftrace_trace_onoff_unreg(char *glob, char *cmd, char *param) |
308 | { | 308 | { |
309 | struct ftrace_hook_ops *ops; | 309 | struct ftrace_probe_ops *ops; |
310 | 310 | ||
311 | /* we register both traceon and traceoff to this callback */ | 311 | /* we register both traceon and traceoff to this callback */ |
312 | if (strcmp(cmd, "traceon") == 0) | 312 | if (strcmp(cmd, "traceon") == 0) |
313 | ops = &traceon_hook_ops; | 313 | ops = &traceon_probe_ops; |
314 | else | 314 | else |
315 | ops = &traceoff_hook_ops; | 315 | ops = &traceoff_probe_ops; |
316 | 316 | ||
317 | unregister_ftrace_function_hook_func(glob, ops); | 317 | unregister_ftrace_function_probe_func(glob, ops); |
318 | 318 | ||
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
@@ -322,7 +322,7 @@ ftrace_trace_onoff_unreg(char *glob, char *cmd, char *param) | |||
322 | static int | 322 | static int |
323 | ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) | 323 | ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) |
324 | { | 324 | { |
325 | struct ftrace_hook_ops *ops; | 325 | struct ftrace_probe_ops *ops; |
326 | void *count = (void *)-1; | 326 | void *count = (void *)-1; |
327 | char *number; | 327 | char *number; |
328 | int ret; | 328 | int ret; |
@@ -336,9 +336,9 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) | |||
336 | 336 | ||
337 | /* we register both traceon and traceoff to this callback */ | 337 | /* we register both traceon and traceoff to this callback */ |
338 | if (strcmp(cmd, "traceon") == 0) | 338 | if (strcmp(cmd, "traceon") == 0) |
339 | ops = &traceon_hook_ops; | 339 | ops = &traceon_probe_ops; |
340 | else | 340 | else |
341 | ops = &traceoff_hook_ops; | 341 | ops = &traceoff_probe_ops; |
342 | 342 | ||
343 | if (!param) | 343 | if (!param) |
344 | goto out_reg; | 344 | goto out_reg; |
@@ -357,7 +357,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) | |||
357 | return ret; | 357 | return ret; |
358 | 358 | ||
359 | out_reg: | 359 | out_reg: |
360 | ret = register_ftrace_function_hook(glob, ops, count); | 360 | ret = register_ftrace_function_probe(glob, ops, count); |
361 | 361 | ||
362 | return ret; | 362 | return ret; |
363 | } | 363 | } |