]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add trace_get/put_event_file()
authorTom Zanussi <zanussi@kernel.org>
Wed, 29 Jan 2020 18:59:22 +0000 (12:59 -0600)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 30 Jan 2020 14:46:28 +0000 (09:46 -0500)
commit35dcd67c0bb9a4b58c36ae3f6a1685483e6e6c62
treef3798c12d745cde3663edacdf5c41c939db9863c
parent99cab9349d689d612622804647d90aa15cb2758c
tracing: Add trace_get/put_event_file()

Add a function to get an event file and prevent it from going away on
module or instance removal.

trace_get_event_file() will find an event file in a given instance (if
instance is NULL, it assumes the top trace array) and return it,
pinning the instance's trace array as well as the event's module, if
applicable, so they won't go away while in use.

trace_put_event_file() does the matching release.

Link: http://lkml.kernel.org/r/bb31ac4bdda168d5ed3c4b5f5a4c8f633e8d9118.1580323897.git.zanussi@kernel.org
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
[ Moved trace_array_put() to end of trace_put_event_file() ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/trace_events.h
kernel/trace/trace_events.c