tracing: Add hist trigger snapshot() action
Add support for hist:handlerXXX($var).snapshot(), which will take a snapshot of the current trace buffer whenever handlerXXX is hit. As a first user, this also adds snapshot() action support for the onmax() handler i.e. hist:onmax($var).snapshot(). Also, the hist trigger key printing is moved into a separate function so the snapshot() action can print a histogram key outside the histogram display - add and use hist_trigger_print_key() for that purpose. Link: http://lkml.kernel.org/r/2f1a952c0dcd8aca8702ce81269581a692396d45.1550100284.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:

committed by
Steven Rostedt (VMware)

parent
a35873a099
commit
a3785b7eca
@@ -4919,6 +4919,9 @@ static const char readme_msg[] =
|
||||
"\t The available actions are:\n\n"
|
||||
"\t <synthetic_event>(param list) - generate synthetic event\n"
|
||||
"\t save(field,...) - save current event fields\n"
|
||||
#ifdef CONFIG_TRACER_SNAPSHOT
|
||||
"\t snapshot() - snapshot the trace buffer\n"
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user