]> sourceware.org Git - systemtap.git/commitdiff
If uprobes isn't in the kernel, pull it in from the runtime.
authorkenistoj <kenistoj>
Fri, 28 Sep 2007 23:50:40 +0000 (23:50 +0000)
committerkenistoj <kenistoj>
Fri, 28 Sep 2007 23:50:40 +0000 (23:50 +0000)
tapsets.cxx

index 72dff3e537ea1fad02c22c87383ae9ff382b94fc..1943b8afa06453590a21e8ca58aa9a70c02927b4 100644 (file)
@@ -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; };";
This page took 0.032172 seconds and 5 git commands to generate.