tracing: Remove open-coding of hist trigger var_ref management
authorTom Zanussi <tom.zanussi@linux.intel.com>
Tue, 18 Dec 2018 20:33:23 +0000 (14:33 -0600)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 22 Dec 2018 13:21:04 +0000 (08:21 -0500)
commitde40f033d4e84e843d6a12266e3869015ea9097c
treec5f87d360c14c882ca02a557b0ae86852bd48fe2
parente4f6d245031e04bdd12db390298acec0474a1a46
tracing: Remove open-coding of hist trigger var_ref management

Have create_var_ref() manage the hist trigger's var_ref list, rather
than having similar code doing it in multiple places.  This cleans up
the code and makes sure var_refs are always accounted properly.

Also, document the var_ref-related functions to make what their
purpose clearer.

Link: http://lkml.kernel.org/r/05ddae93ff514e66fc03897d6665231892939913.1545161087.git.tom.zanussi@linux.intel.com
Acked-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c