diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-11-23 05:37:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-23 05:49:57 -0500 |
commit | 4ed7c92d68a5387ba5f7030dc76eab03558e27f5 (patch) | |
tree | 38d758819c41261275c2dbd6f64976f824c5fd27 /include/linux/perf_event.h | |
parent | f67218c3e93abaf0f480bb94b53d234853ffe4de (diff) |
perf_events: Undo some recursion damage
Make perf_swevent_get_recursion_context return a context number
and disable preemption.
This could be used to remove the IRQ disable from the trace bit
and index the per-cpu buffer with.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091123103819.993226816@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 74e98b1d3391..43adbd7f0010 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -874,8 +874,8 @@ extern int perf_output_begin(struct perf_output_handle *handle, | |||
874 | extern void perf_output_end(struct perf_output_handle *handle); | 874 | extern void perf_output_end(struct perf_output_handle *handle); |
875 | extern void perf_output_copy(struct perf_output_handle *handle, | 875 | extern void perf_output_copy(struct perf_output_handle *handle, |
876 | const void *buf, unsigned int len); | 876 | const void *buf, unsigned int len); |
877 | extern int perf_swevent_get_recursion_context(int **recursion); | 877 | extern int perf_swevent_get_recursion_context(void); |
878 | extern void perf_swevent_put_recursion_context(int *recursion); | 878 | extern void perf_swevent_put_recursion_context(int rctx); |
879 | #else | 879 | #else |
880 | static inline void | 880 | static inline void |
881 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } | 881 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } |
@@ -904,8 +904,8 @@ static inline void perf_event_mmap(struct vm_area_struct *vma) { } | |||
904 | static inline void perf_event_comm(struct task_struct *tsk) { } | 904 | static inline void perf_event_comm(struct task_struct *tsk) { } |
905 | static inline void perf_event_fork(struct task_struct *tsk) { } | 905 | static inline void perf_event_fork(struct task_struct *tsk) { } |
906 | static inline void perf_event_init(void) { } | 906 | static inline void perf_event_init(void) { } |
907 | static int perf_swevent_get_recursion_context(int **recursion) { return -1; } | 907 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
908 | static void perf_swevent_put_recursion_context(int *recursion) { } | 908 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
909 | 909 | ||
910 | #endif | 910 | #endif |
911 | 911 | ||