]> asedeno.scripts.mit.edu Git - linux.git/commit
tracing: Add per-element variable support to tracing_map
authorTom Zanussi <tom.zanussi@linux.intel.com>
Tue, 16 Jan 2018 02:51:46 +0000 (20:51 -0600)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 10 Mar 2018 21:05:53 +0000 (16:05 -0500)
commit2734b629525a9dae5bf217cbf0a9651da93d2108
treecceda953ecbf5a2ec814399751089c1c9996eb3c
parentad42febe51ae0a2e875f507a37a6329277f75fdd
tracing: Add per-element variable support to tracing_map

In order to allow information to be passed between trace events, add
support for per-element variables to tracing_map.  This provides a
means for histograms to associate a value or values with an entry when
it's saved or updated, and retrieved by a subsequent event occurrences.

Variables can be set using tracing_map_set_var() and read using
tracing_map_read_var().  tracing_map_var_set() returns true or false
depending on whether or not the variable has been set or not, which is
important for event-matching applications.

tracing_map_read_var_once() reads the variable and resets it to the
'unset' state, implementing read-once variables, which are also
important for event-matching uses.

Link: http://lkml.kernel.org/r/7fa001108252556f0c6dd9d63145eabfe3370d1a.1516069914.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>
kernel/trace/tracing_map.c
kernel/trace/tracing_map.h