]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - kernel/trace/trace.c
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)
commit39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544
tree323e858496ef9c587a3e9861dab863af5303f82f
parent77271ce4b2c0df0a76ad1cbb6a95b07e1f88c1ea
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