[PATCH v4 05/24] tracing: Add events to trace remotes
Steven Rostedt
rostedt at goodmis.org
Fri May 9 12:47:35 PDT 2025
On Tue, 6 May 2025 17:48:01 +0100
Vincent Donnefort <vdonnefort at google.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);
> +};
More information about the linux-arm-kernel
mailing list