linux/kernel/trace
Steven Rostedt ed926f9b35 ftrace: Use counters to enable functions to trace
Every function has its own record that stores the instruction
pointer and flags for the function to be traced. There are only
two flags: enabled and free. The enabled flag states that tracing
for the function has been enabled (actively traced), and the free
flag states that the record no longer points to a function and can
be used by new functions (loaded modules).

These flags are now moved to the MSB of the flags (actually just
the top 32bits). The rest of the bits (30 bits) are now used as
a ref counter. Everytime a tracer register functions to trace,
those functions will have its counter incremented.

When tracing is enabled, to determine if a function should be traced,
the counter is examined, and if it is non-zero it is set to trace.

When a ftrace_ops is registered to trace functions, its hashes
are examined. If the ftrace_ops filter_hash count is zero, then
all functions are set to be traced, otherwise only the functions
in the hash are to be traced. The exception to this is if a function
is also in the ftrace_ops notrace_hash. Then that function's counter
is not incremented for this ftrace_ops.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-18 15:29:47 -04:00
..
blktrace.c block: make unplug timer trace event correspond to the schedule() unplug 2011-04-16 13:51:05 +02:00
ftrace.c ftrace: Use counters to enable functions to trace 2011-05-18 15:29:47 -04:00
Kconfig ftrace: Build without frame pointers on Microblaze 2011-04-21 09:06:24 -04:00
Makefile tracing: Fix TRACE_EVENT power tracepoint creation 2011-01-07 23:26:29 -05:00
power-traces.c perf: Clean up power events by introducing new, more generic ones 2011-01-04 08:16:54 +01:00
ring_buffer_benchmark.c ring-buffer: Make benchmark handle missed events 2010-04-27 13:26:58 -04:00
ring_buffer.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_branch.c tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_clock.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_entries.h Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_event_perf.c tracing: New flag to allow non privileged users to use a trace event 2010-11-18 14:37:40 +01:00
trace_events_filter.c trace, filters: Initialize the match variable in process_ops() properly 2011-03-18 14:41:27 +01:00
trace_events.c Regression: partial revert "tracing: Remove lock_depth from event entry" 2011-05-06 13:20:59 -07:00
trace_export.c tracing: Replace trace_event struct array with pointer array 2011-02-02 21:37:13 -05:00
trace_functions_graph.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_functions.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_irqsoff.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_kdb.c kdb,ftdump: Remove reference to internal kdb include 2010-10-22 15:34:11 -05:00
trace_kprobe.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_mmiotrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_nop.c
trace_output.c tracing: Avoid soft lockup in trace_pipe 2011-04-04 12:18:24 -04:00
trace_output.h tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_printk.c tracing: Print trace_bprintk() formats for modules too 2011-04-04 12:18:24 -04:00
trace_sched_switch.c tracing: Remove obsolete sched_switch tracer 2011-02-08 17:14:56 -05:00
trace_sched_wakeup.c tracing: Fix compile issue for trace_sched_wakeup.c 2010-10-19 10:56:19 -04:00
trace_selftest_dynamic.c
trace_selftest.c sched: Constify function scope static struct sched_param usage 2011-01-07 15:55:45 +01:00
trace_stack.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
trace_stat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c tracing/syscalls: Early terminate search for sys_ni_syscall 2011-02-07 21:30:14 -05:00
trace_workqueue.c jump label: Initialize workqueue tracepoints *before* they are registered 2010-09-22 16:30:03 -04:00
trace.c Merge commit 'v2.6.39-rc7' into perf/core 2011-05-10 17:05:45 +02:00
trace.h tracing: Align 4 byte ints together in struct tracer 2011-03-10 10:34:54 -05:00