diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-21 18:45:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-22 10:27:54 +0100 |
commit | 69507c06539332e6e49f83aa478844130233bece (patch) | |
tree | 184bbcc7160c5d0e304166b1ecb190897e1f0afc | |
parent | f8ec1062f589cdb1cffcffab1376124a1bc08500 (diff) |
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 <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/trace/ring_buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } /** |