diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-29 13:43:37 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-05-05 13:51:02 -0400 |
commit | f0d2c681ac0a85142fc8abe65fc33fcad35cb9b7 (patch) | |
tree | eafd2b655fc7ad0695fc5dbc343bcc1eb17e2e32 /include/linux/ring_buffer.h | |
parent | d6ce96dabe2c4409fd009ec14250a1fdbab4b133 (diff) | |
download | linux-stable-f0d2c681ac0a85142fc8abe65fc33fcad35cb9b7.tar.gz linux-stable-f0d2c681ac0a85142fc8abe65fc33fcad35cb9b7.tar.bz2 linux-stable-f0d2c681ac0a85142fc8abe65fc33fcad35cb9b7.zip |
ring-buffer: add counters for commit overrun and nmi dropped entries
The WARN_ON in the ring buffer when a commit is preempted and the
buffer is filled by preceding writes can happen in normal operations.
The WARN_ON makes it look like a bug, not to mention, because
it does not stop tracing and calls printk which can also recurse, this
is prone to deadlock (the WARN_ON is not in a position to recurse).
This patch removes the WARN_ON and replaces it with a counter that
can be retrieved by a tracer. This counter is called commit_overrun.
While at it, I added a nmi_dropped counter to count any time an NMI entry
is dropped because the NMI could not take the spinlock.
[ Impact: prevent deadlock by printing normal case warning ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r-- | include/linux/ring_buffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 1c2f80911fbe..f1345828c7c5 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -153,6 +153,8 @@ unsigned long ring_buffer_entries(struct ring_buffer *buffer); unsigned long ring_buffer_overruns(struct ring_buffer *buffer); unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); +unsigned long ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu); +unsigned long ring_buffer_nmi_dropped_cpu(struct ring_buffer *buffer, int cpu); u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu); void ring_buffer_normalize_time_stamp(struct ring_buffer *buffer, |