[PATCH 1/3][RFC] [PATCH 1/3] tracing: Clean up ftrace.h header and add ftrace_set_notrace() declaration

From: Steven Rostedt
Date: Thu Oct 29 2009 - 17:05:39 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

The ftrace_set_notrace() declaration is missing from ftrace.h. This patch
adds it. I also noticed that the #else portion uses macros instead of
inlines, so those are updated as well.

The unregister_ftrace_command() in the #else side had an incorrect
prototype and is now fixed.

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
include/linux/ftrace.h | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 0b4f97d..5d31e93 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -158,6 +158,7 @@ struct dyn_ftrace {

int ftrace_force_update(void);
void ftrace_set_filter(unsigned char *buf, int len, int reset);
+void ftrace_set_notrace(unsigned char *buf, int len, int reset);

int register_ftrace_command(struct ftrace_func_command *cmd);
int unregister_ftrace_command(struct ftrace_func_command *cmd);
@@ -236,17 +237,26 @@ extern int skip_trace(unsigned long ip);
extern void ftrace_disable_daemon(void);
extern void ftrace_enable_daemon(void);
#else
-# define skip_trace(ip) ({ 0; })
-# define ftrace_force_update() ({ 0; })
-# define ftrace_set_filter(buf, len, reset) do { } while (0)
-# define ftrace_disable_daemon() do { } while (0)
-# define ftrace_enable_daemon() do { } while (0)
+static inline int skip_trace(unsigned long ip)
+{
+ return 0;
+}
+static inline ftrace_force_update(void)
+{
+ return 0;
+}
+static inline void ftrace_disable_daemon(void) { }
+static inline void ftrace_enable_daemon(void) { }
+static inline void
+ftrace_set_filter(unsigned char *buf, int len, int reset) { }
+static inline void
+ftrace_set_notrace(unsigned char *buf, int len, int reset) { }
static inline void ftrace_release_mod(struct module *mod) {}
static inline int register_ftrace_command(struct ftrace_func_command *cmd)
{
return -EINVAL;
}
-static inline int unregister_ftrace_command(char *cmd_name)
+static inline int unregister_ftrace_command(struct ftrace_func_command *cmd);
{
return -EINVAL;
}
--
1.6.3.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/