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/trace | |
parent | 1092307d582a7566d23779c304cf86f3075ac5f0 (diff) | |
download | kernel_goldelico_gta04-91a8d07d82cac3aae3ef2ea1aaba5c9c4a934e91.zip kernel_goldelico_gta04-91a8d07d82cac3aae3ef2ea1aaba5c9c4a934e91.tar.gz kernel_goldelico_gta04-91a8d07d82cac3aae3ef2ea1aaba5c9c4a934e91.tar.bz2 |
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')
-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 9c1e73d..bd38c5c 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; } /** |