diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-21 18:45:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-22 04:31:58 -0500 |
commit | 91a8d07d82cac3aae3ef2ea1aaba5c9c4a934e91 (patch) | |
tree | f1d3f093332ecb5e49bff1d1290164237a026475 /kernel/trace/ring_buffer.c | |
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/trace/ring_buffer.c')
-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) | |||
2174 | 2174 | ||
2175 | cpu_buffer->overrun = 0; | 2175 | cpu_buffer->overrun = 0; |
2176 | cpu_buffer->entries = 0; | 2176 | cpu_buffer->entries = 0; |
2177 | |||
2178 | cpu_buffer->write_stamp = 0; | ||
2179 | cpu_buffer->read_stamp = 0; | ||
2177 | } | 2180 | } |
2178 | 2181 | ||
2179 | /** | 2182 | /** |