diff options
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index da09a037abcd..b80fbcf70af4 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -127,12 +127,21 @@ enum trace_flag_type { | |||
127 | 127 | ||
128 | #define TRACE_BUF_SIZE 1024 | 128 | #define TRACE_BUF_SIZE 1024 |
129 | 129 | ||
130 | struct trace_array; | ||
131 | |||
132 | struct trace_cpu { | ||
133 | struct trace_array *tr; | ||
134 | struct dentry *dir; | ||
135 | int cpu; | ||
136 | }; | ||
137 | |||
130 | /* | 138 | /* |
131 | * The CPU trace array - it consists of thousands of trace entries | 139 | * The CPU trace array - it consists of thousands of trace entries |
132 | * plus some other descriptor data: (for example which task started | 140 | * plus some other descriptor data: (for example which task started |
133 | * the trace, etc.) | 141 | * the trace, etc.) |
134 | */ | 142 | */ |
135 | struct trace_array_cpu { | 143 | struct trace_array_cpu { |
144 | struct trace_cpu trace_cpu; | ||
136 | atomic_t disabled; | 145 | atomic_t disabled; |
137 | void *buffer_page; /* ring buffer spare */ | 146 | void *buffer_page; /* ring buffer spare */ |
138 | 147 | ||
@@ -151,6 +160,8 @@ struct trace_array_cpu { | |||
151 | char comm[TASK_COMM_LEN]; | 160 | char comm[TASK_COMM_LEN]; |
152 | }; | 161 | }; |
153 | 162 | ||
163 | struct tracer; | ||
164 | |||
154 | /* | 165 | /* |
155 | * The trace array - an array of per-CPU trace arrays. This is the | 166 | * The trace array - an array of per-CPU trace arrays. This is the |
156 | * highest level data structure that individual tracers deal with. | 167 | * highest level data structure that individual tracers deal with. |
@@ -161,9 +172,16 @@ struct trace_array { | |||
161 | struct list_head list; | 172 | struct list_head list; |
162 | int cpu; | 173 | int cpu; |
163 | int buffer_disabled; | 174 | int buffer_disabled; |
175 | struct trace_cpu trace_cpu; /* place holder */ | ||
176 | int stop_count; | ||
177 | int clock_id; | ||
178 | struct tracer *current_trace; | ||
164 | unsigned int flags; | 179 | unsigned int flags; |
165 | cycle_t time_start; | 180 | cycle_t time_start; |
181 | raw_spinlock_t start_lock; | ||
166 | struct dentry *dir; | 182 | struct dentry *dir; |
183 | struct dentry *options; | ||
184 | struct dentry *percpu_dir; | ||
167 | struct dentry *event_dir; | 185 | struct dentry *event_dir; |
168 | struct list_head systems; | 186 | struct list_head systems; |
169 | struct list_head events; | 187 | struct list_head events; |
@@ -474,6 +492,7 @@ struct dentry *trace_create_file(const char *name, | |||
474 | void *data, | 492 | void *data, |
475 | const struct file_operations *fops); | 493 | const struct file_operations *fops); |
476 | 494 | ||
495 | struct dentry *tracing_init_dentry_tr(struct trace_array *tr); | ||
477 | struct dentry *tracing_init_dentry(void); | 496 | struct dentry *tracing_init_dentry(void); |
478 | 497 | ||
479 | struct ring_buffer_event; | 498 | struct ring_buffer_event; |
@@ -979,7 +998,7 @@ extern const char *__stop___trace_bprintk_fmt[]; | |||
979 | void trace_printk_init_buffers(void); | 998 | void trace_printk_init_buffers(void); |
980 | void trace_printk_start_comm(void); | 999 | void trace_printk_start_comm(void); |
981 | int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set); | 1000 | int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set); |
982 | int set_tracer_flag(unsigned int mask, int enabled); | 1001 | int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled); |
983 | 1002 | ||
984 | #undef FTRACE_ENTRY | 1003 | #undef FTRACE_ENTRY |
985 | #define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter) \ | 1004 | #define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter) \ |