History

ftrace: Mark get_lock_parent_ip() __always_inline

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

John Keeping committed 3 years ago

Commit ea65b411 parent 6455b611 file · +1 −1Browse files

Unified · Split

include/linux/ftrace.h+1−1
@@ -980,7 +980,7 @@ static inline void __ftrace_enabled_restore(int enabled) · 979 unmodified lines
980980 #define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5))
981981 #define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6))
982982
983−static inline unsigned long get_lock_parent_ip(void)
983+static __always_inline unsigned long get_lock_parent_ip(void)
984984 {
985985 unsigned long addr = CALLER_ADDR0;
986986