Re: [PATCH v3 00/22] Move notrace from inline to __always_inline

From: David Laight

Date: Tue Dec 01 2026 - 17:27:57 EST


On Tue, 1 Dec 2026 23:03:55 +0100
"Christophe Leroy (CS GROUP)" <chleroy@xxxxxxxxxx> wrote:

> Le 01/12/2026 à 12:13, David Laight a écrit :
> > On Mon, 30 Nov 2026 20:21:39 -0800
> > Song Liu <song@xxxxxxxxxx> wrote:
> >
> >> Since commit 45959ee7aa64 ("ftrace: Do not function trace inlined
> >> functions"), every function marked inline is also notrace. When the
> >> compiler does not inline such a function, the out-of-line copy cannot
> >> be traced with ftrace, cannot be a BPF fentry/fexit target, and cannot
> >> be livepatched.
> >
> > That seems entirely reasonable to me.
> > Anything marked inline is really expected to be inlined (even if the
> > compiler decides otherwise).
>
> Obviously not, see commit 60a3cdd06394 ("x86: add optimized inlining")

That is just because some things are marked inline that really shouldn't be.
And they are still marked inline, and the code author probably expected them
to be inlined, that patch just lets the compiler not inline them.
It has also forced a lot of other code be marked always_inline
I remember the sheer amount of object code that some large (too large)
nested #defines generated on the SYSV kernel - inlined bloat isn't new.

David

>
> Christophe