Thread (7 messages) 7 messages, 2 authors, 2025-10-19

Re: [PATCH v3 1/2] tracing: Allow tracer to add more than 32 options

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-10-19 17:46:56
Also in: lkml

On Sat, 18 Oct 2025 00:01:30 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
On Wed, 15 Oct 2025 17:20:20 -0400
Steven Rostedt [off-list ref] wrote:

I could not find any other enum64 usage, so I doubt it is
available. (Does it depend on compiler?)
It seems C23 standard support it...
Bah, I thought I saw it used, but it appears it's BPF that does
something special.

quoted
Not to mention, using const u64 requires saving these numbers in an address
and referencing them, instead of doing it inlined in text. That is, using
u64 instead of enum64 is both slower and wastes more memory.  
Yeah, I expected that the compiler could easily optimize correctly, but
maybe not?
I doubt it. The values are exported to be allowed to be used in other
files, so I doubt it can optimize it.

The only thing I can think of is to unravel the enum into a bunch of
#defines, that have the bit shifts.

-- 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