diff options
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index b28bf8812efc..f6965f775b43 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/clocksource.h> | 7 | #include <linux/clocksource.h> |
8 | #include <linux/ring_buffer.h> | ||
8 | #include <linux/mmiotrace.h> | 9 | #include <linux/mmiotrace.h> |
9 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.h> |
10 | 11 | ||
@@ -102,7 +103,6 @@ struct trace_field { | |||
102 | char flags; | 103 | char flags; |
103 | char preempt_count; | 104 | char preempt_count; |
104 | int pid; | 105 | int pid; |
105 | cycle_t t; | ||
106 | union { | 106 | union { |
107 | struct ftrace_entry fn; | 107 | struct ftrace_entry fn; |
108 | struct ctx_switch_entry ctx; | 108 | struct ctx_switch_entry ctx; |
@@ -139,16 +139,9 @@ struct trace_entry { | |||
139 | * the trace, etc.) | 139 | * the trace, etc.) |
140 | */ | 140 | */ |
141 | struct trace_array_cpu { | 141 | struct trace_array_cpu { |
142 | struct list_head trace_pages; | ||
143 | atomic_t disabled; | 142 | atomic_t disabled; |
144 | raw_spinlock_t lock; | ||
145 | struct lock_class_key lock_key; | ||
146 | 143 | ||
147 | /* these fields get copied into max-trace: */ | 144 | /* these fields get copied into max-trace: */ |
148 | unsigned trace_head_idx; | ||
149 | unsigned trace_tail_idx; | ||
150 | void *trace_head; /* producer */ | ||
151 | void *trace_tail; /* consumer */ | ||
152 | unsigned long trace_idx; | 145 | unsigned long trace_idx; |
153 | unsigned long overrun; | 146 | unsigned long overrun; |
154 | unsigned long saved_latency; | 147 | unsigned long saved_latency; |
@@ -172,6 +165,7 @@ struct trace_iterator; | |||
172 | * They have on/off state as well: | 165 | * They have on/off state as well: |
173 | */ | 166 | */ |
174 | struct trace_array { | 167 | struct trace_array { |
168 | struct ring_buffer *buffer; | ||
175 | unsigned long entries; | 169 | unsigned long entries; |
176 | long ctrl; | 170 | long ctrl; |
177 | int cpu; | 171 | int cpu; |
@@ -219,27 +213,21 @@ struct trace_iterator { | |||
219 | struct trace_array *tr; | 213 | struct trace_array *tr; |
220 | struct tracer *trace; | 214 | struct tracer *trace; |
221 | void *private; | 215 | void *private; |
222 | long last_overrun[NR_CPUS]; | 216 | struct ring_buffer_iter *buffer_iter[NR_CPUS]; |
223 | long overrun[NR_CPUS]; | ||
224 | 217 | ||
225 | /* The below is zeroed out in pipe_read */ | 218 | /* The below is zeroed out in pipe_read */ |
226 | struct trace_seq seq; | 219 | struct trace_seq seq; |
227 | struct trace_entry *ent; | 220 | struct trace_entry *ent; |
228 | int cpu; | 221 | int cpu; |
229 | 222 | u64 ts; | |
230 | struct trace_entry *prev_ent; | ||
231 | int prev_cpu; | ||
232 | 223 | ||
233 | unsigned long iter_flags; | 224 | unsigned long iter_flags; |
234 | loff_t pos; | 225 | loff_t pos; |
235 | unsigned long next_idx[NR_CPUS]; | ||
236 | struct list_head *next_page[NR_CPUS]; | ||
237 | unsigned next_page_idx[NR_CPUS]; | ||
238 | long idx; | 226 | long idx; |
239 | }; | 227 | }; |
240 | 228 | ||
241 | void trace_wake_up(void); | 229 | void trace_wake_up(void); |
242 | void tracing_reset(struct trace_array_cpu *data); | 230 | void tracing_reset(struct trace_array *tr, int cpu); |
243 | int tracing_open_generic(struct inode *inode, struct file *filp); | 231 | int tracing_open_generic(struct inode *inode, struct file *filp); |
244 | struct dentry *tracing_init_dentry(void); | 232 | struct dentry *tracing_init_dentry(void); |
245 | void init_tracer_sysprof_debugfs(struct dentry *d_tracer); | 233 | void init_tracer_sysprof_debugfs(struct dentry *d_tracer); |