From: Steven Rostedt Date: Wed, 21 Jan 2009 23:45:57 +0000 (-0500) Subject: ring-buffer: reset timestamps when ring buffer is reset X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=69507c06539332e6e49f83aa478844130233bece;p=linux-2.6-omap-h63xx.git ring-buffer: reset timestamps when ring buffer is reset 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 890020e28a3..7839280ffcd 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2166,6 +2166,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; } /**