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:31:58 +0100 |
commit | 91a8d07d82cac3aae3ef2ea1aaba5c9c4a934e91 (patch) | |
tree | f1d3f093332ecb5e49bff1d1290164237a026475 /kernel | |
parent | 1092307d582a7566d23779c304cf86f3075ac5f0 (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>
Diffstat (limited to 'kernel')
-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 9c1e73da4e30..bd38c5cfd8ad 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -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; } /** |