]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
trace: set max latency variable to zero on default
authorSteven Rostedt <srostedt@redhat.com>
Fri, 16 Jan 2009 04:40:11 +0000 (23:40 -0500)
committerIngo Molnar <mingo@elte.hu>
Fri, 16 Jan 2009 11:18:09 +0000 (12:18 +0100)
Impact: trace max latencies on start of latency tracing

This patch sets the max latency to zero whenever one of the
irq variant tracers or the wakeup tracer is set to current tracer.

Most developers expect to see output when starting up a latency
tracer. But since the max_latency is already set to max, and
it takes a latency greater than max_latency to be recorded, there
is no trace. This is not the expected behavior and has even confused
myself.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.c
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c

index 7de6a94063dd77f727f4aed30dc92686ea5a271e..220c264e3111552529c917bd095fb2e62608bc0f 100644 (file)
@@ -41,7 +41,7 @@
 
 #define TRACE_BUFFER_FLAGS     (RB_FL_OVERWRITE)
 
-unsigned long __read_mostly    tracing_max_latency = (cycle_t)ULONG_MAX;
+unsigned long __read_mostly    tracing_max_latency;
 unsigned long __read_mostly    tracing_thresh;
 
 /*
index 7c2e326bbc8b15d942532d5951a38978fb66e194..62a78d943534cd0c6b4d50d8ef5832db741c881d 100644 (file)
@@ -380,6 +380,7 @@ static void stop_irqsoff_tracer(struct trace_array *tr)
 
 static void __irqsoff_tracer_init(struct trace_array *tr)
 {
+       tracing_max_latency = 0;
        irqsoff_trace = tr;
        /* make sure that the tracer is visible */
        smp_wmb();
index 43586b689e3108c8cad184a6667365b7a1dc87da..42ae1e77b6b3a499408b1d23f101ac154be0fa70 100644 (file)
@@ -333,6 +333,7 @@ static void stop_wakeup_tracer(struct trace_array *tr)
 
 static int wakeup_tracer_init(struct trace_array *tr)
 {
+       tracing_max_latency = 0;
        wakeup_trace = tr;
        start_wakeup_tracer(tr);
        return 0;