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
980#define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5))980#define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5))
981#define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6))981#define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6))
982 982
983static inline unsigned long get_lock_parent_ip(void)983static __always_inline unsigned long get_lock_parent_ip(void)
984{984{
985 unsigned long addr = CALLER_ADDR0;985 unsigned long addr = CALLER_ADDR0;
986 986