diff options
Diffstat (limited to 'include/linux/ftrace_event.h')
| -rw-r--r-- | include/linux/ftrace_event.h | 23 | 
1 files changed, 17 insertions, 6 deletions
| diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 2233c98d80df..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; | 
| @@ -121,9 +122,8 @@ struct ftrace_event_call { | |||
| 121 | int (*regfunc)(struct ftrace_event_call *); | 122 | int (*regfunc)(struct ftrace_event_call *); | 
| 122 | void (*unregfunc)(struct ftrace_event_call *); | 123 | void (*unregfunc)(struct ftrace_event_call *); | 
| 123 | int id; | 124 | int id; | 
| 125 | const char *print_fmt; | ||
| 124 | int (*raw_init)(struct ftrace_event_call *); | 126 | int (*raw_init)(struct ftrace_event_call *); | 
| 125 | int (*show_format)(struct ftrace_event_call *, | ||
| 126 | struct trace_seq *); | ||
| 127 | int (*define_fields)(struct ftrace_event_call *); | 127 | int (*define_fields)(struct ftrace_event_call *); | 
| 128 | struct list_head fields; | 128 | struct list_head fields; | 
| 129 | int filter_active; | 129 | int filter_active; | 
| @@ -138,9 +138,6 @@ struct ftrace_event_call { | |||
| 138 | 138 | ||
| 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 
| 140 | 140 | ||
| 141 | extern char *perf_trace_buf; | ||
| 142 | extern char *perf_trace_buf_nmi; | ||
| 143 | |||
| 144 | #define MAX_FILTER_PRED 32 | 141 | #define MAX_FILTER_PRED 32 | 
| 145 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 
| 146 | 143 | ||
| @@ -188,13 +185,27 @@ do { \ | |||
| 188 | __trace_printk(ip, fmt, ##args); \ | 185 | __trace_printk(ip, fmt, ##args); \ | 
| 189 | } while (0) | 186 | } while (0) | 
| 190 | 187 | ||
| 191 | #ifdef CONFIG_EVENT_PROFILE | 188 | #ifdef CONFIG_PERF_EVENTS | 
| 192 | struct perf_event; | 189 | struct perf_event; | 
| 193 | extern int ftrace_profile_enable(int event_id); | 190 | extern int ftrace_profile_enable(int event_id); | 
| 194 | extern void ftrace_profile_disable(int event_id); | 191 | extern void ftrace_profile_disable(int event_id); | 
| 195 | 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, | 
| 196 | char *filter_str); | 193 | char *filter_str); | 
| 197 | 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 | } | ||
| 198 | #endif | 209 | #endif | 
| 199 | 210 | ||
| 200 | #endif /* _LINUX_FTRACE_EVENT_H */ | 211 | #endif /* _LINUX_FTRACE_EVENT_H */ | 
