]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ring-buffer: reset timestamps when ring buffer is reset
authorSteven Rostedt <srostedt@redhat.com>
Wed, 21 Jan 2009 23:45:57 +0000 (18:45 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 22 Jan 2009 09:31:58 +0000 (10:31 +0100)
Impact: fix bad times of recent resets

The ring buffer needs to reset its timestamps when reseting of the
buffer, otherwise the timestamps are stale and might be used to
calculate times in the buffer causing funny timestamps to appear.

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

index 9c1e73da4e30162c36422072277a57254219b3a3..bd38c5cfd8ad715e4a1d58fa6d9eeda6be1189a2 100644 (file)
@@ -2174,6 +2174,9 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
 
        cpu_buffer->overrun = 0;
        cpu_buffer->entries = 0;
+
+       cpu_buffer->write_stamp = 0;
+       cpu_buffer->read_stamp = 0;
 }
 
 /**