Messages in this thread | | | Date | Thu, 12 Jan 2023 16:26:27 -0700 | From | Ross Zwisler <> | Subject | Re: [PATCH 3/4] tracing: Add trace_array_puts() to write into instance |
| |
On Wed, Jan 11, 2023 at 09:56:39AM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > Add a generic trace_array_puts() that can be used to "trace_puts()" into > an allocated trace_array instance. This is just another variant of > trace_array_printk(). > > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > --- > include/linux/trace.h | 13 +++++++++++++ > kernel/trace/trace.c | 27 +++++++++++++++++---------- > 2 files changed, 30 insertions(+), 10 deletions(-) > > diff --git a/include/linux/trace.h b/include/linux/trace.h > index 80ffda871749..afe61949e83a 100644 > --- a/include/linux/trace.h > +++ b/include/linux/trace.h > @@ -33,6 +33,19 @@ struct trace_array; > int register_ftrace_export(struct trace_export *export); > int unregister_ftrace_export(struct trace_export *export); > > +/** > + * trace_array_puts - write a constant string into the trace buffer. > + * @tr: The trace array to write to > + * @ip: The address of the caller
@ip is not an arg to trace_array_puts(), an can be dropped from the comment.
Other than that, you can add:
Reviewed-by: Ross Zwisler <zwisler@google.com>
| |