Skip to content

Commit b8299d3

Browse files
committed
tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and this makes the stack tracer fail to compile. Just define it to zero in this case. Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com Cc: stable@vger.kernel.org Fixes: 4df2971 ("tracing: Remove most or all of stack tracer stack size from stack_max_size") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent d2ccbcc commit b8299d3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎kernel/trace/trace_stack.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ static void check_stack(unsigned long ip, unsigned long *stack)
283283
local_irq_restore(flags);
284284
}
285285

286+
/* Some archs may not define MCOUNT_INSN_SIZE */
287+
#ifndef MCOUNT_INSN_SIZE
288+
# define MCOUNT_INSN_SIZE 0
289+
#endif
290+
286291
static void
287292
stack_trace_call(unsigned long ip, unsigned long parent_ip,
288293
struct ftrace_ops *op, struct pt_regs *pt_regs)

0 commit comments

Comments
 (0)