1
0
Fork 0
alistair23-linux/kernel/trace
Tom Zanussi 2a2df32115 tracing: Add 'traceon' and 'traceoff' event trigger commands
Add 'traceon' and 'traceoff' event_command commands.  traceon and
traceoff event triggers are added by the user via these commands in a
similar way and using practically the same syntax as the analagous
'traceon' and 'traceoff' ftrace function commands, but instead of
writing to the set_ftrace_filter file, the traceon and traceoff
triggers are written to the per-event 'trigger' files:

    echo 'traceon' > .../tracing/events/somesys/someevent/trigger
    echo 'traceoff' > .../tracing/events/somesys/someevent/trigger

The above command will turn tracing on or off whenever someevent is
hit.

This also adds a 'count' version that limits the number of times the
command will be invoked:

    echo 'traceon:N' > .../tracing/events/somesys/someevent/trigger
    echo 'traceoff:N' > .../tracing/events/somesys/someevent/trigger

Where N is the number of times the command will be invoked.

The above commands will will turn tracing on or off whenever someevent
is hit, but only N times.

Some common register/unregister_trigger() implementations of the
event_command reg()/unreg() callbacks are also provided, which add and
remove trigger instances to the per-event list of triggers, and
arm/disarm them as appropriate.  event_trigger_callback() is a
general-purpose event_command func() implementation that orchestrates
command parsing and registration for most normal commands.

Most event commands will use these, but some will override and
possibly reuse them.

The event_trigger_init(), event_trigger_free(), and
event_trigger_print() functions are meant to be common implementations
of the event_trigger_ops init(), free(), and print() ops,
respectively.

Most trigger_ops implementations will use these, but some will
override and possibly reuse them.

Link: http://lkml.kernel.org/r/00a52816703b98d2072947478dd6e2d70cde5197.1382622043.git.tom.zanussi@linux.intel.com

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-12-20 18:40:24 -05:00
..
Kconfig ring-buffer: Select IRQ_WORK 2013-05-03 19:24:17 -04:00
Makefile tracing: Add basic event trigger framework 2013-12-20 18:40:22 -05:00
blktrace.c kernel: trace: blktrace: remove redundent memcpy() in compat_blk_trace_setup() 2013-11-08 09:04:30 -07:00
ftrace.c ftrace: Fix function graph with loading of modules 2013-11-26 10:36:50 -05:00
power-traces.c PM / tracing: remove deprecated power trace API 2013-01-26 00:39:12 +01:00
ring_buffer.c tracing: Typo fix on ring buffer comments 2013-07-18 21:31:26 -04:00
ring_buffer_benchmark.c tracing: Use NUMA allocation for per-cpu ring buffer pages 2011-06-14 22:04:39 -04:00
rpm-traces.c PM / Runtime: Introduce trace points for tracing rpm_* functions 2011-09-27 22:53:27 +02:00
trace.c This batch of changes is mostly clean ups and small bug fixes. 2013-11-16 12:23:18 -08:00
trace.h tracing: Add basic event trigger framework 2013-12-20 18:40:22 -05:00
trace_branch.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00
trace_clock.c tracing: Add "uptime" trace clock that uses jiffies 2013-03-15 00:36:09 -04:00
trace_entries.h tracing: Add trace_puts() for even faster trace_printk() tracing 2013-03-15 00:35:55 -04:00
trace_event_perf.c perf/trace: Properly use u64 to hold event_id 2013-11-19 16:57:44 +01:00
trace_events.c tracing: Add basic event trigger framework 2013-12-20 18:40:22 -05:00
trace_events_filter.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00
trace_events_filter_test.h tracing/filter: Add startup tests for events filter 2011-08-19 14:35:59 -04:00
trace_events_trigger.c tracing: Add 'traceon' and 'traceoff' event trigger commands 2013-12-20 18:40:24 -05:00
trace_export.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00
trace_functions.c tracing: Add ref_data to function and fgraph tracer structs 2013-07-18 21:31:31 -04:00
trace_functions_graph.c tracing: Do not use signed enums with unsigned long long in fgragh output 2013-11-06 15:26:56 -05:00
trace_irqsoff.c tracing: Use flag buffer_disabled for irqsoff tracer 2013-07-01 20:34:28 -04:00
trace_kdb.c tracing: Consolidate max_tr into main trace_array structure 2013-03-15 00:35:40 -04:00
trace_kprobe.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00
trace_mmiotrace.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05: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, sched: Add TRACE_FLAG_PREEMPT_RESCHED 2013-11-11 12:43:39 +01:00
trace_output.h tracing: Rename trace_event_mutex to trace_event_sem 2013-03-15 13:22:10 -04:00
trace_printk.c tracing: Add __tracepoint_string() to export string pointers 2013-07-26 13:39:44 -04:00
trace_probe.c tracing: Replace strict_strto* with kstrto* 2012-10-31 16:45:23 -04:00
trace_probe.h uprobes/tracing: Introduce is_trace_uprobe_enabled() 2013-02-08 18:24:30 +01:00
trace_sched_switch.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00
trace_sched_wakeup.c tracing: Add function-trace option to disable function tracing of latency tracers 2013-03-15 00:36:08 -04:00
trace_selftest.c ftrace: Do not run selftest if command line parameter is set 2013-07-01 20:57:15 -04:00
trace_selftest_dynamic.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_stack.c Tracing updates for Linux 3.10 2013-04-29 13:55:38 -07:00
trace_stat.c trace/trace_stat: use rbtree postorder iteration helper instead of opencoding 2013-11-05 16:01:47 -05:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c tracing: Add basic event trigger framework 2013-12-20 18:40:22 -05:00
trace_uprobe.c tracing: Update event filters for multibuffer 2013-11-05 16:50:20 -05:00