Thread (12 messages) flat view 12 messages, 3 authors, 2026-02-04

Re: [PATCH v2] tracing: Fix funcgraph_exit calltime/rettime offset for 32-bit ARM

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-02-03 14:29:53
Also in: lkml

On Tue, 3 Feb 2026 18:04:21 +0800 (CST)
"jempty.liang" [off-list ref] wrote:
quoted
#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.
quoted
  
Are you saying this still doesn't work?

That would be an issue because then it would have the same bugs with
generic trace events which uses the same solution.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help