summaryrefslogtreecommitdiffstats
path: root/runtime/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.c')
-rw-r--r--runtime/stack.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/stack.c b/runtime/stack.c
index 3d907a7f..4dd1dca3 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -27,6 +27,20 @@
#define MAXBACKTRACE 20
+/* If uprobes isn't in the kernel, pull it in from the runtime. */
+#if defined(CONFIG_UTRACE) /* uprobes doesn't work without utrace */
+#if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE)
+#include <linux/uprobes.h>
+#else
+#include "uprobes/uprobes.h"
+#endif
+#ifndef UPROBES_API_VERSION
+#define UPROBES_API_VERSION 1
+#endif
+#else
+struct uretprobe_instance;
+#endif
+
#if defined(STAPCONF_KERNEL_STACKTRACE)
#include <linux/stacktrace.h>
#include <asm/stacktrace.h>