linux/kernel/trace
Frederic Weisbecker 20ab4425a7 tracing: Allocate the ftrace event profile buffer dynamically
Currently the trace event profile buffer is allocated in the stack. But
this may be too much for the stack, as the events can have large
statically defined field size and can also grow with dynamic arrays.

Allocate two per cpu buffer for all profiled events. The first cpu
buffer is used to host every non-nmi context traces. It is protected
by disabling the interrupts while writing and committing the trace.

The second buffer is reserved for nmi. So that there is no race between
them and the first buffer.

The whole write/commit section is rcu protected because we release
these buffers while deactivating the last profiling trace event.

v2: Move the buffers from trace_event to be global, as pointed by
    Steven Rostedt.

v3: Fix the syscall events to handle the profiling buffer races
    by disabling interrupts, now that the buffers are globals.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
2009-09-18 07:25:44 +02:00
..
blktrace.c Merge commit 'v2.6.31-rc9' into tracing/core 2009-09-06 06:11:42 +02:00
ftrace.c tracing: switch function prints from %pf to %ps 2009-09-17 15:53:40 -04:00
Kconfig ftrace: document function and function graph implementation 2009-09-14 21:43:15 -04:00
kmemtrace.c tracing: remove users of tracing_reset 2009-09-04 12:12:39 -04:00
Makefile tracing/events: convert block trace points to TRACE_EVENT() 2009-06-09 12:34:23 -04:00
ring_buffer_benchmark.c ring-buffer: have benchmark test print to trace buffer 2009-06-17 17:01:09 -04:00
ring_buffer.c ring-buffer: typecast cmpxchg to fix PowerPC warning 2009-09-14 09:41:57 -04: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 Merge branch 'linus' into tracing/core 2009-05-07 11:17:34 +02:00
trace_clock.c tracing: optimize global_trace_clock cachelines 2009-09-15 12:24:22 -04:00
trace_entries.h tracing: remove some unused macros 2009-09-14 11:43:24 -04:00
trace_event_profile.c tracing: Allocate the ftrace event profile buffer dynamically 2009-09-18 07:25:44 +02:00
trace_events_filter.c tracing: move PRED macros to trace_events_filter.c 2009-09-09 23:54:11 -04:00
trace_events.c Merge branch 'linus' into tracing/core 2009-09-17 20:53:10 +02:00
trace_export.c tracing: remove some unused macros 2009-09-14 11:43:24 -04:00
trace_functions_graph.c tracing: switch function prints from %pf to %ps 2009-09-17 15:53:40 -04:00
trace_functions.c tracing: switch function prints from %pf to %ps 2009-09-17 15:53:40 -04:00
trace_hw_branches.c Merge branch 'tracing/hw-branch-tracing' into tracing/core 2009-05-07 13:36:22 +02:00
trace_irqsoff.c tracing: do not update tracing_max_latency when tracer is stopped 2009-09-12 21:45:17 -04: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: consolidate code between trace_output.c and trace_function_graph.c 2009-09-11 14:24:13 -04: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_power.c tracing: pass around ring buffer instead of tracer 2009-09-04 18:59:39 -04:00
trace_printk.c tracing: show proper address for trace-printk format 2009-07-23 10:07:17 -04: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 tracing: do not update tracing_max_latency when tracer is stopped 2009-09-12 21:45:17 -04:00
trace_selftest_dynamic.c ftrace: fix dynamic ftrace selftest 2008-05-23 21:13:23 +02:00
trace_selftest.c tracing/function-graph-tracer: Move graph event insertion helpers in the graph tracer file 2009-08-06 07:28:06 +02:00
trace_stack.c trace_stack: Simplify seqfile code 2009-08-17 11:25:09 +02: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 tracing: Allocate the ftrace event profile buffer dynamically 2009-09-18 07:25:44 +02:00
trace_sysprof.c Merge branch 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-15 10:06:19 -07:00
trace_workqueue.c tracing/workqueues: Add refcnt to struct cpu_workqueue_stats 2009-07-10 12:14:07 +02:00
trace.c tracing: add filter event logic to special, mmiotrace and boot tracers 2009-09-12 23:34:04 -04:00
trace.h tracing: use the new trace_entries.h to create format files 2009-09-12 23:08:10 -04:00