Skip to content

Commit

Permalink
ftrace: enabled tracing by default
Browse files Browse the repository at this point in the history
This patch is the correct way to have tracing enabled by default.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Steven Rostedt authored and Thomas Gleixner committed May 23, 2008
1 parent 4eebcc8 commit 26994ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static struct trace_array max_tr;

static DEFINE_PER_CPU(struct trace_array_cpu, max_data);

static int tracer_enabled;
static int tracer_enabled = 1;
static unsigned long trace_nr_entries = 16384UL;

static struct tracer *trace_types __read_mostly;
Expand Down Expand Up @@ -2268,6 +2268,8 @@ __init static int tracer_alloc_buffers(void)
int ret = -ENOMEM;
int i;

global_trace.ctrl = tracer_enabled;

/* Allocate the first page for all buffers */
for_each_possible_cpu(i) {
data = global_trace.data[i] = &per_cpu(global_trace_cpu, i);
Expand Down

0 comments on commit 26994ea

Please sign in to comment.