[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCGpchGnvyFpWk2y@google.com>
Date: Mon, 12 May 2025 08:55:30 +0100
From: Vincent Donnefort <vdonnefort@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
linux-trace-kernel@...r.kernel.org, maz@...nel.org,
oliver.upton@...ux.dev, joey.gouly@....com, suzuki.poulose@....com,
yuzenghui@...wei.com, kvmarm@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, jstultz@...gle.com,
qperret@...gle.com, will@...nel.org, kernel-team@...roid.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 05/24] tracing: Add events to trace remotes
On Fri, May 09, 2025 at 03:47:35PM -0400, Steven Rostedt wrote:
> On Tue, 6 May 2025 17:48:01 +0100
> Vincent Donnefort <vdonnefort@...gle.com> wrote:
>
> > diff --git a/include/linux/trace_remote_event.h b/include/linux/trace_remote_event.h
> > new file mode 100644
> > index 000000000000..621c5dff0664
> > --- /dev/null
> > +++ b/include/linux/trace_remote_event.h
> > @@ -0,0 +1,23 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +
> > +#ifndef _LINUX_TRACE_REMOTE_EVENTS_H
> > +#define _LINUX_TRACE_REMOTE_EVENTS_H
> > +
> > +struct trace_remote;
> > +struct trace_event_fields;
> > +
> > +struct remote_event_hdr {
> > + unsigned short id;
> > +};
> > +
> > +#define REMOTE_EVENT_NAME_MAX 29
>
> 29 is a particularly strange number. It's not even divisible by
> sizeof(short). This will leave a hole in the remote_event structure.
>
> Should it be "30" to plug up that one byte space between name and "id"?
Ha yes 30 is what it should be!
>
> -- Steve
>
> > +struct remote_event {
> > + char name[REMOTE_EVENT_NAME_MAX];
> > + unsigned short id;
> > + bool enabled;
> > + struct trace_remote *remote;
> > + struct trace_event_fields *fields;
> > + char *print_fmt;
> > + void (*print)(void *evt, struct trace_seq *seq);
> > +};
Powered by blists - more mailing lists