aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-17 05:31:01 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-17 05:31:01 -0500
commitf492d3f8385a98f828e8220d14492337dc29e07b (patch)
tree31f22c83f7e45388955aacb45c425d7cb6a4d78c /include
parentc4e2b432d5b57e2faaeea048079b31c243079647 (diff)
parente110e3d1eaa0f9628918be67ddd32e8ad65a2871 (diff)
Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h40
-rw-r--r--include/linux/ring_buffer.h2
2 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 106b7909d500..b331e216d8a1 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -95,10 +95,41 @@ stack_trace_sysctl(struct ctl_table *table, int write,
95 loff_t *ppos); 95 loff_t *ppos);
96#endif 96#endif
97 97
98struct ftrace_func_command {
99 struct list_head list;
100 char *name;
101 int (*func)(char *func, char *cmd,
102 char *params, int enable);
103};
104
98#ifdef CONFIG_DYNAMIC_FTRACE 105#ifdef CONFIG_DYNAMIC_FTRACE
99/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */ 106/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
100#include <asm/ftrace.h> 107#include <asm/ftrace.h>
101 108
109struct seq_file;
110
111struct ftrace_hook_ops {
112 void (*func)(unsigned long ip,
113 unsigned long parent_ip,
114 void **data);
115 int (*callback)(unsigned long ip, void **data);
116 void (*free)(void **data);
117 int (*print)(struct seq_file *m,
118 unsigned long ip,
119 struct ftrace_hook_ops *ops,
120 void *data);
121};
122
123extern int
124register_ftrace_function_hook(char *glob, struct ftrace_hook_ops *ops,
125 void *data);
126extern void
127unregister_ftrace_function_hook(char *glob, struct ftrace_hook_ops *ops,
128 void *data);
129extern void
130unregister_ftrace_function_hook_func(char *glob, struct ftrace_hook_ops *ops);
131extern void unregister_ftrace_function_hook_all(char *glob);
132
102enum { 133enum {
103 FTRACE_FL_FREE = (1 << 0), 134 FTRACE_FL_FREE = (1 << 0),
104 FTRACE_FL_FAILED = (1 << 1), 135 FTRACE_FL_FAILED = (1 << 1),
@@ -119,6 +150,9 @@ struct dyn_ftrace {
119int ftrace_force_update(void); 150int ftrace_force_update(void);
120void ftrace_set_filter(unsigned char *buf, int len, int reset); 151void ftrace_set_filter(unsigned char *buf, int len, int reset);
121 152
153int register_ftrace_command(struct ftrace_func_command *cmd);
154int unregister_ftrace_command(struct ftrace_func_command *cmd);
155
122/* defined in arch */ 156/* defined in arch */
123extern int ftrace_ip_converted(unsigned long ip); 157extern int ftrace_ip_converted(unsigned long ip);
124extern int ftrace_dyn_arch_init(void *data); 158extern int ftrace_dyn_arch_init(void *data);
@@ -202,6 +236,12 @@ extern void ftrace_enable_daemon(void);
202# define ftrace_disable_daemon() do { } while (0) 236# define ftrace_disable_daemon() do { } while (0)
203# define ftrace_enable_daemon() do { } while (0) 237# define ftrace_enable_daemon() do { } while (0)
204static inline void ftrace_release(void *start, unsigned long size) { } 238static inline void ftrace_release(void *start, unsigned long size) { }
239static inline int register_ftrace_command(struct ftrace_func_command *cmd)
240{
241}
242static inline int unregister_ftrace_command(char *cmd_name)
243{
244}
205#endif /* CONFIG_DYNAMIC_FTRACE */ 245#endif /* CONFIG_DYNAMIC_FTRACE */
206 246
207/* totally disable ftrace - can not re-enable after this */ 247/* totally disable ftrace - can not re-enable after this */
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index 8e6646a54acf..f5e793d69bd3 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -128,10 +128,12 @@ void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
128void tracing_on(void); 128void tracing_on(void);
129void tracing_off(void); 129void tracing_off(void);
130void tracing_off_permanent(void); 130void tracing_off_permanent(void);
131int tracing_is_on(void);
131#else 132#else
132static inline void tracing_on(void) { } 133static inline void tracing_on(void) { }
133static inline void tracing_off(void) { } 134static inline void tracing_off(void) { }
134static inline void tracing_off_permanent(void) { } 135static inline void tracing_off_permanent(void) { }
136static inline int tracing_is_on(void) { return 0; }
135#endif 137#endif
136 138
137void *ring_buffer_alloc_read_page(struct ring_buffer *buffer); 139void *ring_buffer_alloc_read_page(struct ring_buffer *buffer);