]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: export stats of ring buffers to userspace
authorSteven Rostedt <srostedt@redhat.com>
Wed, 29 Apr 2009 22:03:45 +0000 (18:03 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 5 May 2009 17:52:02 +0000 (13:52 -0400)
commit980f90d4ebdb95de8c090ce30a910bcd3f6c97fc
tree6c8ba52ab340e574c21418866bd985d55ab771e9
parent8ed1323d8d01341a7045e0624b01a7b8fd7733e1
tracing: export stats of ring buffers to userspace

This patch adds stats to the ftrace ring buffers:

 # cat /debugfs/tracing/per_cpu/cpu0/stats
 entries: 42360
 overrun: 30509326
 commit overrun: 0
 nmi dropped: 0

Where entries are the total number of data entries in the buffer.

overrun is the number of entries not consumed and were overwritten by
the writer.

commit overrun is the number of entries dropped due to nested writers
wrapping the buffer before the initial writer finished the commit.

nmi dropped is the number of entries dropped due to the ring buffer
lock being held when an nmi was going to write to the ring buffer.
Note, this field will be meaningless and will go away when the ring
buffer becomes lockless.

[ Impact: let userspace know what is happening in the ring buffers ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c