"STAPCONF_HW_BREAKPOINT_CONTEXT", NULL);
output_autoconf(s, o, "autoconf-save-stack-trace.c",
"STAPCONF_KERNEL_STACKTRACE", NULL);
+ output_autoconf(s, o, "autoconf-save-stack-trace-no-bp.c",
+ "STAPCONF_KERNEL_STACKTRACE_NO_BP", NULL);
output_autoconf(s, o, "autoconf-asm-syscall.c",
"STAPCONF_ASM_SYSCALL_H", NULL);
output_autoconf(s, o, "autoconf-ring_buffer-flags.c", "STAPCONF_RING_BUFFER_FLAGS", NULL);
struct uretprobe_instance;
#endif
-#if defined(STAPCONF_KERNEL_STACKTRACE)
+#if defined(STAPCONF_KERNEL_STACKTRACE) || defined(STAPCONF_KERNEL_STACKTRACE_NO_BP)
#include <linux/stacktrace.h>
#include <asm/stacktrace.h>
#endif
#endif
#endif
-#if defined(STAPCONF_KERNEL_STACKTRACE)
+#if defined(STAPCONF_KERNEL_STACKTRACE) || defined(STAPCONF_KERNEL_STACKTRACE_NO_BP)
struct print_stack_data
{
print_data.flags = sym_flags;
print_data.levels = levels;
print_data.skip = skip;
+#if defined(STAPCONF_KERNEL_STACKTRACE)
dump_trace(current, NULL, (long *)stack, 0, &print_stack_ops,
&print_data);
+#else
+ /* STAPCONF_KERNEL_STACKTRACE_NO_BP */
+ dump_trace(current, NULL, (long *)stack, &print_stack_ops,
+ &print_data);
+#endif
}
#else
static void _stp_stack_print_fallback(unsigned long s, int v, int l, int k) {
_stp_print_addr(0, v | _STP_SYM_INEXACT, NULL);
}
-#endif /* defined(STAPCONF_KERNEL_STACKTRACE) */
+#endif /* defined(STAPCONF_KERNEL_STACKTRACE) || defined(STAPCONF_KERNEL_STACKTRACE_NO_BP) */
// Without KPROBES very little works atm.
// But this file is unconditionally imported, while these two functions are only
a pretty good guess at the stack value,
otherwise let dump_stack guess it
(and skip some framework frames). */
-#if defined(STAPCONF_KERNEL_STACKTRACE)
+#if defined(STAPCONF_KERNEL_STACKTRACE) || defined(STAPCONF_KERNEL_STACKTRACE_NO_BP)
unsigned long sp;
int skip;
#ifdef CONFIG_FRAME_POINTER