Re: [PATCH 03/11] tracing: export stats of ring buffers to userspace
From: Frédéric Weisbecker
Date: Wed May 06 2009 - 06:24:04 EST
2009/5/6 Ingo Molnar <mingo@xxxxxxx>:
>
> * 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
But I think I was wrong actually.
I looked at it closer recently and the lock events are traced in a
raw_local_irq_save section.
So the cause is elsewhere. I haven't had anymore problem with it
recently, may be because I'm using a script
which disables the events once I finish the tracing.
--
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/