1
0
Fork 0
alistair23-linux/kernel/trace
Steven Rostedt bc21b47842 tracing: Show the lost events in the trace_pipe output
Now that the ring buffer can keep track of where events are lost.
Use this information to the output of trace_pipe:

       hackbench-3588  [001]  1326.701660: lock_acquire: ffffffff816591e0 read rcu_read_lock
       hackbench-3588  [001]  1326.701661: lock_acquire: ffff88003f4091f0 &(&dentry->d_lock)->rlock
       hackbench-3588  [001]  1326.701664: lock_release: ffff88003f4091f0 &(&dentry->d_lock)->rlock
CPU:1 [LOST 673 EVENTS]
       hackbench-3588  [001]  1326.702711: kmem_cache_free: call_site=ffffffff81102b85 ptr=ffff880026d96738
       hackbench-3588  [001]  1326.702712: lock_release: ffff88003e1480a8 &mm->mmap_sem
       hackbench-3588  [001]  1326.702713: lock_acquire: ffff88003e1480a8 &mm->mmap_sem

Even works with the function graph tracer:

 2) ! 170.098 us  |                                            }
 2)   4.036 us    |                                            rcu_irq_exit();
 2)   3.657 us    |                                            idle_cpu();
 2) ! 190.301 us  |                                          }
CPU:2 [LOST 2196 EVENTS]
 2)   0.853 us    |                            } /* cancel_dirty_page */
 2)               |                            remove_from_page_cache() {
 2)   1.578 us    |                              _raw_spin_lock_irq();
 2)               |                              __remove_from_page_cache() {

Note, it does not work with the iterator "trace" file, since it requires
the use of consuming the page from the ring buffer to determine how many
events were lost, which the iterator does not do.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-03-31 22:57:06 -04:00
..
Kconfig Merge branch 'tracing/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/core 2010-02-27 10:06:10 +01:00
Makefile perf: Drop the obsolete profile naming for trace events 2010-03-10 14:47:18 +01:00
blktrace.c blktrace: perform cleanup after setup error 2010-02-28 19:47:19 +01:00
ftrace.c Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-13 14:43:01 -08:00
kmemtrace.c kmemtrace: Fix up tracer registration 2009-10-01 11:53:44 +02:00
power-traces.c tracing/power: Remove two exports 2009-12-13 18:37:28 +01:00
ring_buffer.c ring-buffer: Add place holder recording of dropped events 2010-03-31 22:57:04 -04:00
ring_buffer_benchmark.c ring-buffer: Add place holder recording of dropped events 2010-03-31 22:57:04 -04:00
trace.c tracing: Show the lost events in the trace_pipe output 2010-03-31 22:57:06 -04:00
trace.h Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-13 14:40:50 -08:00
trace_boot.c tracing: add filter event logic to special, mmiotrace and boot tracers 2009-09-12 23:34:04 -04:00
trace_branch.c tracing: Add correct/incorrect to sort keys for branch annotation output 2010-02-09 21:35:05 -05:00
trace_clock.c tracing: Include irqflags headers from trace clock 2010-02-28 19:45:01 +01:00
trace_entries.h hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events 2009-11-08 15:34:42 +01:00
trace_event_perf.c Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-18 16:52:46 -07:00
trace_events.c perf: Drop the obsolete profile naming for trace events 2010-03-10 14:47:18 +01:00
trace_events_filter.c Merge branch 'perf/urgent' into perf/core 2010-01-29 10:36:22 +01:00
trace_export.c tracing: Remove show_format and related macros from TRACE_EVENT 2010-01-06 12:08:46 -05:00
trace_functions.c tracing: switch function prints from %pf to %ps 2009-09-17 15:53:40 -04:00
trace_functions_graph.c ring-buffer: Add place holder recording of dropped events 2010-03-31 22:57:04 -04:00
trace_hw_branches.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
trace_irqsoff.c tracing: Add stack trace to irqsoff tracer 2009-12-11 13:19:51 -05:00
trace_kprobe.c perf: Drop the obsolete profile naming for trace events 2010-03-10 14:47:18 +01:00
trace_ksym.c ksym_tracer: Remove trace_stat 2009-12-30 07:50:50 +01:00
trace_mmiotrace.c tracing: add filter event logic to special, mmiotrace and boot tracers 2009-09-12 23:34:04 -04:00
trace_nop.c tracing/ftrace: make nop-tracer use polling wait for events on pipe 2009-03-23 09:22:15 +01:00
trace_output.c tracing: Add full state to trace_seq 2009-12-09 14:05:49 -05:00
trace_output.h tracing: consolidate code between trace_output.c and trace_function_graph.c 2009-09-11 14:24:13 -04:00
trace_printk.c tracing: Remove markers 2009-09-18 21:22:08 +02:00
trace_sched_switch.c tracing: pass around ring buffer instead of tracer 2009-09-04 18:59:39 -04:00
trace_sched_wakeup.c locking: Convert __raw_spin* functions to arch_spin* 2009-12-14 23:55:32 +01:00
trace_selftest.c ring-buffer: Add place holder recording of dropped events 2010-03-31 22:57:04 -04:00
trace_selftest_dynamic.c ftrace: fix dynamic ftrace selftest 2008-05-23 21:13:23 +02:00
trace_stack.c tracing: Fix circular dead lock in stack trace 2010-02-02 10:20:18 -05:00
trace_stat.c trace_stat: Fix missing entry in stat file 2009-08-17 11:25:09 +02:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c perf: Drop the obsolete profile naming for trace events 2010-03-10 14:47:18 +01:00
trace_sysprof.c perf events, x86/stacktrace: Make stack walking optional 2009-12-17 09:56:19 +01:00
trace_workqueue.c tracing/workqueues: Add refcnt to struct cpu_workqueue_stats 2009-07-10 12:14:07 +02:00