summaryrefslogtreecommitdiff
path: root/include/linux/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2020-08-06 19:46:49 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-08-08 00:05:01 +0300
commit38ce2a9e33db61a3041840310077072d6210ead4 (patch)
tree50388808fbce15239d7c4ae3a9fbe2150939a496 /include/linux/trace.h
parent10de795a5addd1962406796a6e13ba6cc0fc6bee (diff)
downloadlinux-38ce2a9e33db61a3041840310077072d6210ead4.tar.xz
tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers
As trace_array_printk() used with not global instances will not add noise to the main buffer, they are OK to have in the kernel (unlike trace_printk()). This require the subsystem to create their own tracing instance, and the trace_array_printk() only writes into those instances. Add trace_array_init_printk() to initialize the trace_printk() buffers without printing out the WARNING message. Reported-by: Sean Paul <sean@poorly.run> Reviewed-by: Sean Paul <sean@poorly.run> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/trace.h')
-rw-r--r--include/linux/trace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/trace.h b/include/linux/trace.h
index 7fd86d3c691f..36d255d66f88 100644
--- a/include/linux/trace.h
+++ b/include/linux/trace.h
@@ -29,6 +29,7 @@ struct trace_array;
void trace_printk_init_buffers(void);
int trace_array_printk(struct trace_array *tr, unsigned long ip,
const char *fmt, ...);
+int trace_array_init_printk(struct trace_array *tr);
void trace_array_put(struct trace_array *tr);
struct trace_array *trace_array_get_by_name(const char *name);
int trace_array_destroy(struct trace_array *tr);