diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:45 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:41:35 -0400 |
commit | 93a588f459da134be6ab17c4104e28441beb0d22 (patch) | |
tree | 30eb991743d7ce5698f070204d666eca98519213 /kernel/trace/trace.h | |
parent | 1d4db00a5e30c7b8f8dc2a1b19e886fd942be143 (diff) |
ftrace: change buffers to producer consumer
This patch changes the way the CPU trace buffers are handled.
Instead of always starting from the trace page head, the logic
is changed to a producer consumer logic. This allows for the
buffers to be drained while they are alive.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 5df8ff2b84a7..0ce127455b4b 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -53,13 +53,15 @@ struct trace_entry { | |||
53 | * the trace, etc.) | 53 | * the trace, etc.) |
54 | */ | 54 | */ |
55 | struct trace_array_cpu { | 55 | struct trace_array_cpu { |
56 | void *trace_current; | ||
57 | struct list_head trace_pages; | 56 | struct list_head trace_pages; |
58 | atomic_t disabled; | 57 | atomic_t disabled; |
59 | cycle_t time_offset; | 58 | cycle_t time_offset; |
60 | 59 | ||
61 | /* these fields get copied into max-trace: */ | 60 | /* these fields get copied into max-trace: */ |
62 | unsigned trace_current_idx; | 61 | unsigned trace_head_idx; |
62 | unsigned trace_tail_idx; | ||
63 | void *trace_head; /* producer */ | ||
64 | void *trace_tail; /* consumer */ | ||
63 | unsigned long trace_idx; | 65 | unsigned long trace_idx; |
64 | unsigned long saved_latency; | 66 | unsigned long saved_latency; |
65 | unsigned long critical_start; | 67 | unsigned long critical_start; |