tracing: Add enable_hist/disable_hist triggers
authorTom Zanussi <tom.zanussi@linux.intel.com>
Thu, 3 Mar 2016 18:54:55 +0000 (12:54 -0600)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 19 Apr 2016 22:55:57 +0000 (18:55 -0400)
commitd0bad49bb0a094a1beb06640785f95cb256b7272
treebbcba1655873c597ce50844c5aad99230100b240
parent6a475cb17fe161dbde62eca7e4c2cf59edff182f
tracing: Add enable_hist/disable_hist triggers

Similar to enable_event/disable_event triggers, these triggers enable
and disable the aggregation of events into maps rather than enabling
and disabling their writing into the trace buffer.

They can be used to automatically start and stop hist triggers based
on a matching filter condition.

If there's a paused hist trigger on system:event, the following would
start it when the filter condition was hit:

  # echo enable_hist:system:event [ if filter] > event/trigger

And the following would disable a running system:event hist trigger:

  # echo disable_hist:system:event [ if filter] > event/trigger

See Documentation/trace/events.txt for real examples.

Link: http://lkml.kernel.org/r/f812f086e52c8b7c8ad5443487375e03c96a601f.1457029949.git.tom.zanussi@linux.intel.com
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/trace_events.h
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_events_hist.c
kernel/trace/trace_events_trigger.c