Thread (5 messages) 5 messages, 4 authors, 2023-06-09

Re: [PATCH] ftrace: Allow inline functions not inlined to be traced

From: Josh Poimboeuf <jpoimboe@kernel.org>
Date: 2023-05-31 21:50:23
Also in: live-patching, lkml

On Tue, May 02, 2023 at 04:41:02PM -0400, Steven Rostedt wrote:
quoted hunk ↗ jump to hunk
Today, it is no longer a problem if an inlined function is not inlined and
is traced. Removing notrace from inline has been requested several times
over the years. I believe it is now safe to do so.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/linux/compiler_types.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 547ea1ff806e..c8f23ba1c339 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -182,9 +182,8 @@ struct ftrace_likely_data {
  * externally visible function. This makes extern inline behave as per gnu89
  * semantics rather than c99. This prevents multiple symbol definition errors
  * of extern inline functions at link time.
- * A lot of inline functions can cause havoc with function tracing.
  */
-#define inline inline __gnu_inline __inline_maybe_unused notrace
+#define inline inline __gnu_inline __inline_maybe_unused
Yes!!!  I've been wanting to do this for many years.  This will help
live patching a lot.

Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>

-- 
Josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help