If the compiler decides not to inline this function then preemption tracing will always show an IP inside the preemption disabling path and never the function actually calling preempt_{enable,disable}. Link: https://lore.kernel.org/linux-trace-kernel/20230327173647.1690849-1-john@metanate.com
Unified · Split
| @@ -980,7 +980,7 @@ static inline void __ftrace_enabled_restore(int enabled) · 979 unmodified lines | ||
| 980 | 980 | #define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5)) |
| 981 | 981 | #define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6)) |
| 982 | 982 | |
| 983 | −static inline unsigned long get_lock_parent_ip(void) | |
| 983 | +static __always_inline unsigned long get_lock_parent_ip(void) | |
| 984 | 984 | { |
| 985 | 985 | unsigned long addr = CALLER_ADDR0; |
| 986 | 986 | |