android_kernel_xiaomi_sm8350/kernel/trace
Tom Zanussi e1112b4d96 tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events
This patch adds run-time field descriptions to all the event formats
exported using TRACE_EVENT_FORMAT.  It also hooks up all the tracers
that use them (i.e. the tracers in the 'ftrace subsystem') so they can
also have their output filtered by the event-filtering mechanism.

When I was testing this, there were a couple of things that fooled me
into thinking the filters weren't working, when actually they were -
I'll mention them here so others don't make the same mistakes (and file
bug reports. ;-)

One is that some of the tracers trace multiple events e.g. the
sched_switch tracer uses the context_switch and wakeup events, and if
you don't set filters on all of the traced events, the unfiltered output
from the events without filters on them can make it look like the
filtering as a whole isn't working properly, when actually it is doing
what it was asked to do - it just wasn't asked to do the right thing.

The other is that for the really high-volume tracers e.g. the function
tracer, the volume of filtered events can be so high that it pushes the
unfiltered events out of the ring buffer before they can be read so e.g.
cat'ing the trace file repeatedly shows either no output, or once in
awhile some output but that isn't there the next time you read the
trace, which isn't what you normally expect when reading the trace file.
If you read from the trace_pipe file though, you can catch them before
they disappear.

Changes from v1:

As suggested by Frederic Weisbecker:

- get rid of externs in functions
- added unlikely() to filter_check_discard()

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-14 00:00:50 +02:00
..
blktrace.c blktrace: fix output of BLK_TC_PC events 2009-04-12 15:32:46 +02:00
events.c ftrace: event profile hooks 2009-03-20 10:17:07 +01:00
ftrace.c function-graph: use int instead of atomic for ftrace_graph_active 2009-04-07 14:43:08 +02:00
Kconfig Merge branch 'linus' into tracing/core 2009-04-07 13:47:45 +02:00
kmemtrace.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
Makefile tracing: add per-event filtering 2009-03-22 18:38:46 +01:00
ring_buffer.c tracing/ftrace: factorize the tracing files creation 2009-04-07 14:43:07 +02:00
trace_boot.c tracing: use macros to denote usec and nsec per second 2009-04-07 14:43:06 +02:00
trace_branch.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_clock.c tracing: fix four sparse warnings 2009-03-22 18:16:54 +01:00
trace_event_profile.c tracing/ftrace: factorize the tracing files creation 2009-04-07 14:43:07 +02:00
trace_event_types.h tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_events_filter.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02: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/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_events_stage_3.h tracing/events: don't discard an event after commit 2009-03-23 09:22:15 +01:00
trace_events.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_export.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_functions_graph.c function-graph: add option to calculate graph time or not 2009-03-24 23:41:11 -04:00
trace_functions.c
trace_hw_branches.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_irqsoff.c tracing: have latency tracers set the latency format 2009-03-04 22:15:30 -05:00
trace_mmiotrace.c tracing: use macros to denote usec and nsec per second 2009-04-07 14:43:06 +02: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 Merge branch 'tracing/urgent' into tracing/ftrace 2009-04-07 14:41:17 +02:00
trace_output.h Merge branch 'linus' into tracing/core 2009-04-07 13:47:45 +02:00
trace_power.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace_printk.c tracing/ftrace: factorize the tracing files creation 2009-04-07 14:43:07 +02:00
trace_sched_switch.c ftrace: clean up enable logic for sched_switch 2009-04-07 14:43:09 +02:00
trace_sched_wakeup.c tracing: remove CALLER_ADDR2 from wakeup tracer 2009-04-07 13:58:54 +02:00
trace_selftest_dynamic.c
trace_selftest.c tracing: keep the tracing buffer after self-test failure 2009-03-22 15:17:21 +01:00
trace_stack.c tracing/ftrace: factorize the tracing files creation 2009-04-07 14:43:07 +02:00
trace_stat.c Merge branch 'linus' into tracing/core 2009-04-07 13:47:45 +02:00
trace_stat.h tracing: add handler to trace_stat 2009-03-24 23:22:58 -04:00
trace_syscalls.c tracing/syscalls: use a dedicated file header 2009-04-09 05:43:32 +02:00
trace_sysprof.c tracing/ftrace: factorize the tracing files creation 2009-04-07 14:43:07 +02:00
trace_workqueue.c Merge branch 'linus' into tracing/core 2009-04-07 13:47:45 +02:00
trace.c tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00
trace.h tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events 2009-04-14 00:00:50 +02:00