diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:20:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:20:25 -0500 |
commit | 6556a6743549defc32e5f90ee2cb1ecd833a44c3 (patch) | |
tree | 622306583d4a3c13235a8bfc012854c125c597f1 /include/linux/ftrace_event.h | |
parent | e0d272429a34ff143bfa04ee8e29dd4eed2964c7 (diff) | |
parent | 1dd2980d990068e20045b90c424518cc7f3657ff (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (172 commits)
perf_event, amd: Fix spinlock initialization
perf_event: Fix preempt warning in perf_clock()
perf tools: Flush maps on COMM events
perf_events, x86: Split PMU definitions into separate files
perf annotate: Handle samples not at objdump output addr boundaries
perf_events, x86: Remove superflous MSR writes
perf_events: Simplify code by removing cpu argument to hw_perf_group_sched_in()
perf_events, x86: AMD event scheduling
perf_events: Add new start/stop PMU callbacks
perf_events: Report the MMAP pgoff value in bytes
perf annotate: Defer allocating sym_priv->hist array
perf symbols: Improve debugging information about symtab origins
perf top: Use a macro instead of a constant variable
perf symbols: Check the right return variable
perf/scripts: Tag syscall_name helper as not yet available
perf/scripts: Add perf-trace-python Documentation
perf/scripts: Remove unnecessary PyTuple resizes
perf/scripts: Add syscall tracing scripts
perf/scripts: Add Python scripting engine
perf/scripts: Remove check-perf-trace from listed scripts
...
Fix trivial conflict in tools/perf/util/probe-event.c
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 */ |