Skip to content

Commit ea65b41

Browse files
johnkeepingrostedt
authored andcommitted
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/[email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Fixes: f904f58 ("sched/debug: Fix preempt_disable_ip recording for preempt_disable()") Signed-off-by: John Keeping <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 6455b61 commit ea65b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/ftrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static inline void __ftrace_enabled_restore(int enabled)
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

0 commit comments

Comments
 (0)