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)
commitc8d771835e18c938dae8690611d65fe98ad30f58
tree6c8ba52ab340e574c21418866bd985d55ab771e9
parentf0d2c681ac0a85142fc8abe65fc33fcad35cb9b7
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
This page took 0.028462 seconds and 5 git commands to generate.