diff options
author | Tom Zanussi <zanussi@kernel.org> | 2020-01-29 21:59:21 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-01-30 17:46:27 +0300 |
commit | 89c95fcef1942415e0f20d8c82e6e36ff8eeca9c (patch) | |
tree | 5c7ff66ce0f2250652c7cbcea3e5e46128c92a4e /kernel/trace/trace.h | |
parent | 6722b23e7a2ace078344064a9735fb73e554e9ef (diff) | |
download | linux-89c95fcef1942415e0f20d8c82e6e36ff8eeca9c.tar.xz |
tracing: Add trace_array_find/_get() to find instance trace arrays
Add a new trace_array_find() function that can be used to find a trace
array given the instance name, and replace existing code that does the
same thing with it. Also add trace_array_find_get() which does the
same but returns the trace array after upping its refcount.
Also make both available for use outside of trace.c.
Link: http://lkml.kernel.org/r/cb68528c975eba95bee4561ac67dd1499423b2e5.1580323897.git.zanussi@kernel.org
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index b3075b637d14..f5480a2aa334 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -358,6 +358,8 @@ extern struct mutex trace_types_lock; extern int trace_array_get(struct trace_array *tr); extern int tracing_check_open_get_tr(struct trace_array *tr); +extern struct trace_array *trace_array_find(const char *instance); +extern struct trace_array *trace_array_find_get(const char *instance); extern int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs); extern int tracing_set_clock(struct trace_array *tr, const char *clockstr); |