[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19eab264.7fae.19c22f5d17c.Coremail.imntjempty@163.com>
Date: Tue, 3 Feb 2026 18:04:21 +0800 (CST)
From: "jempty.liang" <imntjempty@....com>
To: "Steven Rostedt" <rostedt@...dmis.org>
Cc: mhiramat@...nel.org, mark.rutland@....com,
mathieu.desnoyers@...icios.com, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tracing: Fix funcgraph_exit calltime/rettime offset
for 32-bit ARM
At 2026-02-03 00:08:28, "Steven Rostedt" <rostedt@...dmis.org> wrote:
>On Mon, 2 Feb 2026 10:38:04 -0500
>Steven Rostedt <rostedt@...dmis.org> wrote:
>
>> Can you try this patch to see if it fixes the issue for you?
>
>Ignore that patch, try this one instead. This was fixed for trace_events a
>while ago, but the same fix wasn't done for ftrace events.
>
>-- Steve
>
>diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
>index 1698fc22afa0..5b96ac750049 100644
>--- a/kernel/trace/trace_export.c
>+++ b/kernel/trace/trace_export.c
>@@ -14,6 +14,9 @@
>
> #include "trace_output.h"
>
>+/* The alignment of a type when in a structure */
>+#define ALIGN_STRUCTFIELD(type) ((int)(__alignof__(struct {type b;})))
>+
> /* Stub function for events with triggers */
> static int ftrace_event_register(struct trace_event_call *call,
> enum trace_reg type, void *data)
>@@ -88,7 +91,7 @@ static void __always_unused ____ftrace_check_##name(void) \
> #undef __field_ext
> #define __field_ext(_type, _item, _filter_type) { \
> .type = #_type, .name = #_item, \
>- .size = sizeof(_type), .align = __alignof__(_type), \
>+ .size = sizeof(_type), .align = ALIGN_STRUCTFIELD(_type), \
> is_signed_type(_type), .filter_type = _filter_type },
>
On the 32-bit ARM platform, when _type is unsigned long long, the resulting align value is 8 instead of the expected 4.
>
Powered by blists - more mailing lists