]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add entries in buffer and total entries to default output header
authorSteven Rostedt <srostedt@redhat.com>
Thu, 17 Nov 2011 15:35:16 +0000 (10:35 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 17 Nov 2011 16:10:43 +0000 (11:10 -0500)
commit126634be2571249b6518082bebbefe0f60d1c172
tree323e858496ef9c587a3e9861dab863af5303f82f
parentf8106ee3cf4b50752ac9d1d68d9c6e34c10c547b
tracing: Add entries in buffer and total entries to default output header

Knowing the number of event entries in the ring buffer compared
to the total number that were written is useful information. The
latency format gives this information and there's no reason that the
default format does not.

This information is now added to the default header, along with the
number of online CPUs:

 # tracer: nop
 #
 # entries-in-buffer/entries-written: 159836/64690869   #P:4
 #
 #                              _-----=> irqs-off
 #                             / _----=> need-resched
 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
           <idle>-0     [000] ...2    49.442971: local_touch_nmi <-cpu_idle
           <idle>-0     [000] d..2    49.442973: enter_idle <-cpu_idle
           <idle>-0     [000] d..2    49.442974: atomic_notifier_call_chain <-enter_idle
           <idle>-0     [000] d..2    49.442976: __atomic_notifier_call_chain <-atomic_notifier

The above shows that the trace contains 159836 entries, but
64690869 were written. One could figure out that there were
64531033 entries that were dropped.

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