aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-05-03 23:09:03 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 00:34:40 -0400
commitae63b31e4d0e2ec09c569306ea46f664508ef717 (patch)
tree0d40e8fddca53d1776254cd92fc73bc4413ee1f5 /kernel/trace/trace.c
parent613f04a0f51e6e68ac6fe571ab79da3c0a5eb4da (diff)
tracing: Separate out trace events from global variables
The trace events for ftrace are all defined via global variables. The arrays of events and event systems are linked to a global list. This prevents multiple users of the event system (what to enable and what not to). By adding descriptors to represent the event/file relation, as well as to which trace_array descriptor they are associated with, allows for more than one set of events to be defined. Once the trace events files have a link between the trace event and the trace_array they are associated with, we can create multiple trace_arrays that can record separate events in separate buffers. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4f1dade56981..932931897b8d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -189,6 +189,8 @@ unsigned long long ns2usecs(cycle_t nsec)
189 */ 189 */
190static struct trace_array global_trace; 190static struct trace_array global_trace;
191 191
192LIST_HEAD(ftrace_trace_arrays);
193
192static DEFINE_PER_CPU(struct trace_array_cpu, global_trace_cpu); 194static DEFINE_PER_CPU(struct trace_array_cpu, global_trace_cpu);
193 195
194int filter_current_check_discard(struct ring_buffer *buffer, 196int filter_current_check_discard(struct ring_buffer *buffer,
@@ -5359,6 +5361,12 @@ __init static int tracer_alloc_buffers(void)
5359 5361
5360 register_die_notifier(&trace_die_notifier); 5362 register_die_notifier(&trace_die_notifier);
5361 5363
5364 global_trace.flags = TRACE_ARRAY_FL_GLOBAL;
5365
5366 INIT_LIST_HEAD(&global_trace.systems);
5367 INIT_LIST_HEAD(&global_trace.events);
5368 list_add(&global_trace.list, &ftrace_trace_arrays);
5369
5362 while (trace_boot_options) { 5370 while (trace_boot_options) {
5363 char *option; 5371 char *option;
5364 5372