summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorkenistoj <kenistoj>2007-09-28 23:50:40 +0000
committerkenistoj <kenistoj>2007-09-28 23:50:40 +0000
commitc480bf3d839721308695064f3631651e73312d9c (patch)
treecf627e42f8a9be21cfa23768589d7d2588925cf5 /tapsets.cxx
parent36b16282fa142c6adfa928d946678cf7c8b19f4c (diff)
downloadsystemtap-steved-c480bf3d839721308695064f3631651e73312d9c.tar.gz
systemtap-steved-c480bf3d839721308695064f3631651e73312d9c.tar.xz
systemtap-steved-c480bf3d839721308695064f3631651e73312d9c.zip
If uprobes isn't in the kernel, pull it in from the runtime.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 72dff3e5..1943b8af 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -4025,12 +4025,13 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
if (probes.empty()) return;
s.op->newline() << "/* ---- user probes ---- */";
- // Warn of misconfigured kernels
- s.op->newline() << "#ifndef CONFIG_UPROBES";
- s.op->newline() << "#error \"Need CONFIG_UPROBES!\"";
- s.op->newline() << "#endif";
-
+ // If uprobes isn't in the kernel, pull it in from the runtime.
+ // TODO: Consider detecting uprobes installed as a module.
+ s.op->newline() << "#ifdef CONFIG_UPROBES";
s.op->newline() << "#include <linux/uprobes.h>";
+ s.op->newline() << "#else";
+ s.op->newline() << "#include \"uprobes/uprobes.c\"";
+ s.op->newline() << "#endif";
s.op->newline() << "struct stap_uprobe {";
s.op->newline(1) << "union { struct uprobe up; struct uretprobe urp; };";