[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABCJKueKhDVarco4mgNeR0hkAhxDtxBjdpu=QaYVi+TGoiqd2g@mail.gmail.com>
Date: Tue, 20 Aug 2024 08:10:42 -0700
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Mark Rutland <mark.rutland@....com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>, linux-kernel@...r.kernel.org,
clang-built-linux <llvm@...ts.linux.dev>, Nathan Chancellor <nathan@...nel.org>
Subject: Re: [BUG] tracing: dynamic ftrace selftest detected failures
On Tue, Aug 20, 2024 at 3:48 AM Mark Rutland <mark.rutland@....com> wrote:
>
> On Tue, Aug 20, 2024 at 10:03:30AM +0900, Masami Hiramatsu wrote:
> > On Mon, 19 Aug 2024 12:02:44 -0400
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> >
> > > On Tue, 20 Aug 2024 00:56:49 +0900
> > > Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> > > >
> > > > >
> > > > > We may need to add "noinline" or something to make sure those functions
> > > > > don't get inlined for LTO.
> > > >
> > > > Yeah, we need such option at least for function call test.
> > >
> > > Could you add the noinline, and if it fixes the issue send a patch?
> >
> > I found the target function already has "noinline". I tried to add noinline
> > to the testing function (callsite), but it also did not work.
> > I think "noinline" is for the compiler, but LTO is done by the linker.
>
> If LTO is breaking noinline, then that has much larger implications for
> noinstr code and similar, and means that LTO is unsound...
The noinline attribute is preserved in LLVM IR, so it should continue
to work with LTO. Which function are we talking about here? Are you
sure the function was inlined instead of being dropped completely?
Does marking the function __used help?
Sami
Powered by blists - more mailing lists