From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux trace kernel <linux-trace-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: PATCH] tracing: Fix unused tracepoints when module uses only exported ones
Date: Mon, 8 Dec 2025 09:22:48 -0500 [thread overview]
Message-ID: <3612840f-0c05-4797-8e75-872a306da45c@efficios.com> (raw)
In-Reply-To: <20251208085336.6658743c@debian>
On 2025-12-08 08:53, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
Missing bracket for [PATCH] in subject.
>
> Building the KVM intel module failed to build with UT=1:
failed -> fails (present ?)
>
> no __tracepoint_strings in file: arch/x86/kvm/kvm-intel.o
> make[3]: *** [/work/git/test-linux.git/scripts/Makefile.modfinal:62: arch/x86/kvm/kvm-intel.ko] Error 1
>
> The reason is that the module only uses the tracepoints defined and
> exported by the main kvm module. The tracepoint-udpate.c code fails the
I guess you mean "tracepoint-update.c" ?
> build if a tracepoint is used, but there's no tracepoints defined. But
tracepoint
> this is acceptable in modules if the tracepoints is defined in the vmlinux
tracepoint
> proper or another module and exported.
>
> Do not fail to build if a tracepoint is used but no tracepoints are
tracepoint .. is
Thanks,
Mathieu
> defined if the code is a module. This should still never happen for the
> vmlinux itself.
>
> Fixes: e30f8e61e2518 ("tracing: Add a tracepoint verification check at build time")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> scripts/tracepoint-update.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/tracepoint-update.c b/scripts/tracepoint-update.c
> index 7f7d90df14ce..90046aedc97b 100644
> --- a/scripts/tracepoint-update.c
> +++ b/scripts/tracepoint-update.c
> @@ -210,6 +210,9 @@ static int process_tracepoints(bool mod, void *addr, const char *fname)
> }
>
> if (!tracepoint_data_sec) {
> + /* A module may reference only exported tracepoints */
> + if (mod)
> + return 0;
> fprintf(stderr, "no __tracepoint_strings in file: %s\n", fname);
> return -1;
> }
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2025-12-08 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 13:53 Steven Rostedt
2025-12-08 14:22 ` Mathieu Desnoyers [this message]
2025-12-10 1:25 ` Steven Rostedt
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=3612840f-0c05-4797-8e75-872a306da45c@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®