Thread (21 messages) 21 messages, 4 authors, 2024-08-23

Re: [BUG] tracing: dynamic ftrace selftest detected failures

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2024-08-21 00:15:08
Also in: lkml, llvm

On Tue, 20 Aug 2024 19:49:14 -0400
Steven Rostedt [off-list ref] wrote:
On Wed, 21 Aug 2024 08:43:51 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
quoted
Can you add the __used and see if it fixes it?  
Adding __used to DYN_FTRACE_TEST_NAME() and DYN_FTRACE_TEST_NAME2() does
not change, the test still fails.
OK, now that sounds like a bug in LTO itself.
Hmm, I think __used just preserve the function exists as a function. But the
callsite can be optimized. This mean the __used function code is duplicated,
and embedded one copy in the callsite, but keep another copy as a function
which can be used from outside. But "noinline" attribute seems to be expected
not embedded in the callsite (because that is what "inlined" mean), so it
looks like a bug.

Thank you,
-- Steve

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help