Re: [RFC PATCH] x86/syscalls: allow tracing of __do_sys_[syscall] functions

From: Steven Rostedt
Date: Mon Sep 26 2022 - 13:28:56 EST


On Tue, 13 Sep 2022 06:52:13 -0700
Nadav Amit <nadav.amit@xxxxxxxxx> wrote:

> +++ b/include/linux/compiler_types.h
> @@ -152,8 +152,12 @@ 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.
> + *
> + * A lot of inline functions can cause havoc with function tracing. If the
> + * function is known to be safe for tracing, inline_trace can be used. Otherwise
> + * inline would prevent tracing.

Perhaps add:

* Don't complain if this function is not available to trace!

;-)

-- Steve

> */
> +#define inline_trace __inline __gnu_inline __inline_maybe_unused
> #define inline inline __gnu_inline __inline_maybe_unused notrace
>