diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-09-02 14:17:06 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-09-04 18:59:39 -0400 |
commit | e77405ad80f53966524b5c31244e13fbbbecbd84 (patch) | |
tree | 65c05f9e1573e9958e52bb72655e00c8592aacd2 /include/linux | |
parent | f633903af2ceb0cec07d45e499a072b6593d0ed1 (diff) |
tracing: pass around ring buffer instead of tracer
The latency tracers (irqsoff and wakeup) can swap trace buffers
on the fly. If an event is happening and has reserved data on one of
the buffers, and the latency tracer swaps the global buffer with the
max buffer, the result is that the event may commit the data to the
wrong buffer.
This patch changes the API to the trace recording to be recieve the
buffer that was used to reserve a commit. Then this buffer can be passed
in to the commit.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ftrace_event.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 755480484eb6..23f7179bf74e 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -93,13 +93,17 @@ void tracing_generic_entry_update(struct trace_entry *entry, | |||
93 | unsigned long flags, | 93 | unsigned long flags, |
94 | int pc); | 94 | int pc); |
95 | struct ring_buffer_event * | 95 | struct ring_buffer_event * |
96 | trace_current_buffer_lock_reserve(int type, unsigned long len, | 96 | trace_current_buffer_lock_reserve(struct ring_buffer **current_buffer, |
97 | int type, unsigned long len, | ||
97 | unsigned long flags, int pc); | 98 | unsigned long flags, int pc); |
98 | void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, | 99 | void trace_current_buffer_unlock_commit(struct ring_buffer *buffer, |
100 | struct ring_buffer_event *event, | ||
99 | unsigned long flags, int pc); | 101 | unsigned long flags, int pc); |
100 | void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, | 102 | void trace_nowake_buffer_unlock_commit(struct ring_buffer *buffer, |
103 | struct ring_buffer_event *event, | ||
101 | unsigned long flags, int pc); | 104 | unsigned long flags, int pc); |
102 | void trace_current_buffer_discard_commit(struct ring_buffer_event *event); | 105 | void trace_current_buffer_discard_commit(struct ring_buffer *buffer, |
106 | struct ring_buffer_event *event); | ||
103 | 107 | ||
104 | void tracing_record_cmdline(struct task_struct *tsk); | 108 | void tracing_record_cmdline(struct task_struct *tsk); |
105 | 109 | ||
@@ -135,7 +139,8 @@ struct ftrace_event_call { | |||
135 | 139 | ||
136 | extern void destroy_preds(struct ftrace_event_call *call); | 140 | extern void destroy_preds(struct ftrace_event_call *call); |
137 | extern int filter_match_preds(struct ftrace_event_call *call, void *rec); | 141 | extern int filter_match_preds(struct ftrace_event_call *call, void *rec); |
138 | extern int filter_current_check_discard(struct ftrace_event_call *call, | 142 | extern int filter_current_check_discard(struct ring_buffer *buffer, |
143 | struct ftrace_event_call *call, | ||
139 | void *rec, | 144 | void *rec, |
140 | struct ring_buffer_event *event); | 145 | struct ring_buffer_event *event); |
141 | 146 | ||