From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] tracing: Allow tracer to add more than 32 options
Date: Sun, 19 Oct 2025 13:46:46 -0400 [thread overview]
Message-ID: <20251019134646.6d6f683d@batman.local.home> (raw)
In-Reply-To: <20251018000130.aa69bd5b6670715b1c52d387@kernel.org>
On Sat, 18 Oct 2025 00:01:30 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> On Wed, 15 Oct 2025 17:20:20 -0400
> Steven Rostedt <rostedt@goodmis.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
next prev parent reply other threads:[~2025-10-19 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 22:34 [PATCH v3 0/2] tracing: Add an option to show symbols in _text+offset for function profiler Masami Hiramatsu (Google)
2025-09-29 22:34 ` [PATCH v3 1/2] tracing: Allow tracer to add more than 32 options Masami Hiramatsu (Google)
2025-10-15 21:20 ` Steven Rostedt
2025-10-17 15:01 ` Masami Hiramatsu
2025-10-19 17:46 ` Steven Rostedt [this message]
2025-10-17 15:50 ` Masami Hiramatsu
2025-09-29 22:35 ` [PATCH v3 2/2] tracing: Add an option to show symbols in _text+offset for function profiler Masami Hiramatsu (Google)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251019134646.6d6f683d@batman.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).