diff options
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r-- | include/linux/ftrace_event.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 84a5629adfd8..6b7c444ab8f6 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/trace_seq.h> | 5 | #include <linux/trace_seq.h> |
6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
7 | #include <linux/hardirq.h> | 7 | #include <linux/hardirq.h> |
8 | #include <linux/perf_event.h> | ||
8 | 9 | ||
9 | struct trace_array; | 10 | struct trace_array; |
10 | struct tracer; | 11 | struct tracer; |
@@ -137,9 +138,6 @@ struct ftrace_event_call { | |||
137 | 138 | ||
138 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 |
139 | 140 | ||
140 | extern char *perf_trace_buf; | ||
141 | extern char *perf_trace_buf_nmi; | ||
142 | |||
143 | #define MAX_FILTER_PRED 32 | 141 | #define MAX_FILTER_PRED 32 |
144 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
145 | 143 | ||
@@ -187,13 +185,27 @@ do { \ | |||
187 | __trace_printk(ip, fmt, ##args); \ | 185 | __trace_printk(ip, fmt, ##args); \ |
188 | } while (0) | 186 | } while (0) |
189 | 187 | ||
190 | #ifdef CONFIG_EVENT_PROFILE | 188 | #ifdef CONFIG_PERF_EVENTS |
191 | struct perf_event; | 189 | struct perf_event; |
192 | extern int ftrace_profile_enable(int event_id); | 190 | extern int ftrace_profile_enable(int event_id); |
193 | extern void ftrace_profile_disable(int event_id); | 191 | extern void ftrace_profile_disable(int event_id); |
194 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 192 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
195 | char *filter_str); | 193 | char *filter_str); |
196 | extern void ftrace_profile_free_filter(struct perf_event *event); | 194 | extern void ftrace_profile_free_filter(struct perf_event *event); |
195 | extern void * | ||
196 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | ||
197 | unsigned long *irq_flags); | ||
198 | |||
199 | static inline void | ||
200 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | ||
201 | u64 count, unsigned long irq_flags) | ||
202 | { | ||
203 | struct trace_entry *entry = raw_data; | ||
204 | |||
205 | perf_tp_event(entry->type, addr, count, raw_data, size); | ||
206 | perf_swevent_put_recursion_context(rctx); | ||
207 | local_irq_restore(irq_flags); | ||
208 | } | ||
197 | #endif | 209 | #endif |
198 | 210 | ||
199 | #endif /* _LINUX_FTRACE_EVENT_H */ | 211 | #endif /* _LINUX_FTRACE_EVENT_H */ |