[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250509154735.530d4a37@gandalf.local.home>
Date: Fri, 9 May 2025 15:47:35 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Vincent Donnefort <vdonnefort@...gle.com>
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 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"?
-- 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