linux/kernel/trace
Frederic Weisbecker 1618536961 tracing/function-graph-tracer: fix functions call traces imbalance
Impact: fix traces output

Sometimes one can observe an imbalance in the traces between function
calls and function return traces:

func1() {
    }
}

The curly brace inside func1() is the return of another function nested
inside func1. The return trace have been inserted in the buffer but not
the entry.
We are storing a return address on the function traces stack while we
haven't inserted its entry on the buffer, hence the imbalance on the
traces.

This is because the tracers doesn't check all failures that can happen
on buffer insertion.

This patch reports the tracing recursion failures and the ring buffer
failures. In such cases, we now restore the original return address for
the function, giving up its return trace.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1237843021-11695-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-23 23:25:32 +01:00
..
Kconfig tracing/syscalls: select kallsysms 2009-03-16 09:13:17 +01:00
Makefile tracing: add per-event filtering 2009-03-22 18:38:46 +01:00
blktrace.c tracing: protect reader of cmdline output 2009-03-16 23:27:06 -04:00
events.c ftrace: event profile hooks 2009-03-20 10:17:07 +01:00
ftrace.c tracing/ftrace: fix the check on nopped sites 2009-03-16 22:15:36 -04:00
kmemtrace.c tracing: Introduce trace_buffer_{lock_reserve,unlock_commit} 2009-02-06 01:01:41 +01:00
ring_buffer.c tracing: add ring_buffer_event_discard() to ring buffer 2009-03-22 18:38:25 +01:00
trace.c tracing/function-graph-tracer: fix functions call traces imbalance 2009-03-23 23:25:32 +01:00
trace.h tracing/events: don't use wake up for events 2009-03-23 09:22:14 +01:00
trace_boot.c tracing: Introduce trace_buffer_{lock_reserve,unlock_commit} 2009-02-06 01:01:41 +01:00
trace_branch.c tracing: remove funky whitespace in the trace code 2009-03-10 14:13:14 -04:00
trace_clock.c trace_clock: fix preemption bug 2009-03-10 20:03:01 +01:00
trace_event_profile.c ftrace: event profile hooks 2009-03-20 10:17:07 +01:00
trace_event_types.h tracing: remove recording function depth from trace_printk 2009-03-19 15:58:47 -04:00
trace_events.c tracing/filters: clean up filter_add_subsystem_pred() 2009-03-23 09:30:37 +01:00
trace_events_filter.c tracing/filters: clean up filter_add_subsystem_pred() 2009-03-23 09:30:37 +01:00
trace_events_stage_1.h tracing: update comments to match event code macros 2009-03-10 13:12:58 -04:00
trace_events_stage_2.h tracing: add run-time field descriptions for event filtering 2009-03-22 18:11:22 +01:00
trace_events_stage_3.h tracing/events: don't discard an event after commit 2009-03-23 09:22:15 +01:00
trace_export.c tracing: remove funky whitespace in the trace code 2009-03-10 14:13:14 -04:00
trace_functions.c tracing/core: use appropriate waiting on trace_pipe 2009-02-18 01:40:20 +01:00
trace_functions_graph.c function-graph: show binary events as comments 2009-03-19 15:58:56 -04:00
trace_hw_branches.c tracing/hw-branch-tracing: convert bts-tracer mutex to a spinlock 2009-02-25 09:16:01 +01:00
trace_irqsoff.c tracing: have latency tracers set the latency format 2009-03-04 22:15:30 -05:00
trace_mmiotrace.c tracing: remove recording function depth from trace_printk 2009-03-19 15:58:47 -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 ftrace: ensure every event gets an id 2009-03-20 10:17:06 +01:00
trace_output.h tracing: make print_(b)printk_msg_only global 2009-03-19 15:57:55 -04:00
trace_power.c tracing: make power tracer start/stop methods lighter weight 2009-03-17 23:12:11 -04:00
trace_printk.c tracing: remove recording function depth from trace_printk 2009-03-19 15:58:47 -04:00
trace_sched_switch.c tracing: make sched_switch stop/start light weight 2009-03-17 23:10:45 -04:00
trace_sched_wakeup.c tracing: have latency tracers set the latency format 2009-03-04 22:15:30 -05:00
trace_selftest.c tracing: keep the tracing buffer after self-test failure 2009-03-22 15:17:21 +01:00
trace_selftest_dynamic.c ftrace: fix dynamic ftrace selftest 2008-05-23 21:13:23 +02:00
trace_stack.c tracing: left align location header in stack_trace 2009-03-13 00:00:58 -04:00
trace_stat.c tracing: fix typing mistake in hint message and comments 2009-02-17 12:38:24 -05:00
trace_stat.h tracing/ftrace: separate events tracing and stats tracing engine 2009-01-14 12:11:37 +01:00
trace_syscalls.c tracing/syscalls: protect thread flag toggling from races 2009-03-16 09:13:16 +01:00
trace_sysprof.c tracing: make all file_operations const 2009-03-05 21:46:40 -05:00
trace_workqueue.c tracing: Don't use tracing_record_cmdline() in workqueue tracer fix 2009-03-12 21:23:47 -04:00