diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:43 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:38:51 -0400 |
commit | 4c11d7aed389375253b59e2b1865eec96663c65d (patch) | |
tree | b43b5e38c33d69d39b5fb87860e5723d1be10416 /kernel/trace/trace.h | |
parent | 5072c59fd45e9976d02ee6f18c7336ef97623cbc (diff) |
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: 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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 3173a93561d4..83e257e38084 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -54,9 +54,11 @@ struct trace_entry { | |||
54 | */ | 54 | */ |
55 | struct trace_array_cpu { | 55 | struct trace_array_cpu { |
56 | void *trace; | 56 | void *trace; |
57 | void *trace_current; | ||
58 | unsigned trace_current_idx; | ||
59 | struct list_head trace_pages; | ||
57 | unsigned long trace_idx; | 60 | unsigned long trace_idx; |
58 | atomic_t disabled; | 61 | atomic_t disabled; |
59 | atomic_t underrun; | ||
60 | unsigned long saved_latency; | 62 | unsigned long saved_latency; |
61 | unsigned long critical_start; | 63 | unsigned long critical_start; |
62 | unsigned long critical_end; | 64 | unsigned long critical_end; |
@@ -112,8 +114,10 @@ struct trace_iterator { | |||
112 | unsigned long iter_flags; | 114 | unsigned long iter_flags; |
113 | loff_t pos; | 115 | loff_t pos; |
114 | unsigned long next_idx[NR_CPUS]; | 116 | unsigned long next_idx[NR_CPUS]; |
117 | struct list_head *next_page[NR_CPUS]; | ||
118 | unsigned next_page_idx[NR_CPUS]; | ||
119 | long idx; | ||
115 | int cpu; | 120 | int cpu; |
116 | int idx; | ||
117 | }; | 121 | }; |
118 | 122 | ||
119 | void notrace tracing_reset(struct trace_array_cpu *data); | 123 | void notrace tracing_reset(struct trace_array_cpu *data); |