X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=wrapper%2Fftrace.h;h=0f15ee4a31daca2942a28ea9d864ebf4255c98c5;hb=a90917c3f8c4ed79117f1caa333b29a2108084ec;hp=4401469251a27205e0bdfc8bff2292818019c48f;hpb=5a9479dcba0b43d326569fa0bd48318222d23fcb;p=lttng-modules.git diff --git a/wrapper/ftrace.h b/wrapper/ftrace.h index 44014692..0f15ee4a 100644 --- a/wrapper/ftrace.h +++ b/wrapper/ftrace.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_FTRACE_H -#define _LTT_WRAPPER_FTRACE_H +#ifndef _LTTNG_WRAPPER_FTRACE_H +#define _LTTNG_WRAPPER_FTRACE_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -16,6 +16,7 @@ #ifdef CONFIG_KALLSYMS #include +#include "kallsyms.h" static inline int wrapper_register_ftrace_function_probe(char *glob, @@ -24,7 +25,7 @@ int wrapper_register_ftrace_function_probe(char *glob, int (*register_ftrace_function_probe_sym)(char *glob, struct ftrace_probe_ops *ops, void *data); - register_ftrace_function_probe_sym = (void *) kallsyms_lookup_name("register_ftrace_function_probe_sym"); + register_ftrace_function_probe_sym = (void *) kallsyms_lookup_funcptr("register_ftrace_function_probe"); if (register_ftrace_function_probe_sym) { return register_ftrace_function_probe_sym(glob, ops, data); } else { @@ -40,7 +41,7 @@ void wrapper_unregister_ftrace_function_probe(char *glob, void (*unregister_ftrace_function_probe_sym)(char *glob, struct ftrace_probe_ops *ops, void *data); - unregister_ftrace_function_probe_sym = (void *) kallsyms_lookup_name("unregister_ftrace_function_probe_sym"); + unregister_ftrace_function_probe_sym = (void *) kallsyms_lookup_funcptr("unregister_ftrace_function_probe"); if (unregister_ftrace_function_probe_sym) { unregister_ftrace_function_probe_sym(glob, ops, data); } else { @@ -53,18 +54,17 @@ void wrapper_unregister_ftrace_function_probe(char *glob, static inline int wrapper_register_ftrace_function_probe(char *glob, - struct ftrace_probe_ops *ops, void *data); - + struct ftrace_probe_ops *ops, void *data) { - return unregister_ftrace_function_probe(); + return register_ftrace_function_probe(glob, ops, data); } static inline void wrapper_unregister_ftrace_function_probe(char *glob, - struct ftrace_probe_ops *ops, void *data); + struct ftrace_probe_ops *ops, void *data) { - return unregister_ftrace_function_probe(); + return unregister_ftrace_function_probe(glob, ops, data); } #endif -#endif /* _LTT_WRAPPER_FTRACE_H */ +#endif /* _LTTNG_WRAPPER_FTRACE_H */