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>
This commit is contained in:
committed by
Thomas Gleixner
parent
1d4db00a5e
commit
93a588f459
@ -53,13 +53,15 @@ struct trace_entry {
|
||||
* the trace, etc.)
|
||||
*/
|
||||
struct trace_array_cpu {
|
||||
void *trace_current;
|
||||
struct list_head trace_pages;
|
||||
atomic_t disabled;
|
||||
cycle_t time_offset;
|
||||
|
||||
/* these fields get copied into max-trace: */
|
||||
unsigned trace_current_idx;
|
||||
unsigned trace_head_idx;
|
||||
unsigned trace_tail_idx;
|
||||
void *trace_head; /* producer */
|
||||
void *trace_tail; /* consumer */
|
||||
unsigned long trace_idx;
|
||||
unsigned long saved_latency;
|
||||
unsigned long critical_start;
|
||||
|
Reference in New Issue
Block a user