[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251019134646.6d6f683d@batman.local.home>
Date: Sun, 19 Oct 2025 13:46:46 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] tracing: Allow tracer to add more than 32
options
On Sat, 18 Oct 2025 00:01:30 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> On Wed, 15 Oct 2025 17:20:20 -0400
> Steven Rostedt <rostedt@...dmis.org> 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.
>
> >
> > 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
Powered by blists - more mailing lists