Commit 4c11d7ae authored by Steven Rostedt's avatar Steven Rostedt Committed by Thomas Gleixner

ftrace: convert single large buffer into single pages.

Allocating large buffers for the tracer may fail easily.
This patch converts the buffer from a large ordered allocation
to single pages. It uses the struct page LRU field to link the
pages together.

Later patches may also implement dynamic increasing and decreasing
of the trace buffers.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 5072c59f
This diff is collapsed.
...@@ -54,9 +54,11 @@ struct trace_entry { ...@@ -54,9 +54,11 @@ struct trace_entry {
*/ */
struct trace_array_cpu { struct trace_array_cpu {
void *trace; void *trace;
void *trace_current;
unsigned trace_current_idx;
struct list_head trace_pages;
unsigned long trace_idx; unsigned long trace_idx;
atomic_t disabled; atomic_t disabled;
atomic_t underrun;
unsigned long saved_latency; unsigned long saved_latency;
unsigned long critical_start; unsigned long critical_start;
unsigned long critical_end; unsigned long critical_end;
...@@ -112,8 +114,10 @@ struct trace_iterator { ...@@ -112,8 +114,10 @@ struct trace_iterator {
unsigned long iter_flags; unsigned long iter_flags;
loff_t pos; loff_t pos;
unsigned long next_idx[NR_CPUS]; unsigned long next_idx[NR_CPUS];
struct list_head *next_page[NR_CPUS];
unsigned next_page_idx[NR_CPUS];
long idx;
int cpu; int cpu;
int idx;
}; };
void notrace tracing_reset(struct trace_array_cpu *data); void notrace tracing_reset(struct trace_array_cpu *data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment