Re: [PATCH 03/11] tracing: export stats of ring buffers touserspace

From: Ingo Molnar
Date: Wed May 06 2009 - 04:28:39 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> From: Steven Rostedt <srostedt@xxxxxxxxxx>
>
> 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 ]

nice! I was always wondering about these properties - Frederic
reported that we drop a lot of trace entries when filtering is
enabled, due to the rather stupid:

reserve-buffer
put-stuff-into-buffer
drop-buffer-if-filter-false

common sequence we do on heavily filtered input.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/