summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/runtime.h2
-rw-r--r--tapsets.cxx22
2 files changed, 22 insertions, 2 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 0a656b78..70fe4dce 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -89,8 +89,6 @@ static struct
#include "regs.c"
#include "regs-ia64.c"
-#include "task_finder.c"
-
#include "sym.c"
#ifdef STP_PERFMON
#include "perf.c"
diff --git a/tapsets.cxx b/tapsets.cxx
index b12d7711..694490d8 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -6474,6 +6474,14 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline();
s.op->newline() << "/* ---- itrace probes ---- */";
+
+ // Note that we can potentially include task_finder.c multiple times
+ // in the generated code. That is OK, since task_finder.c has guard
+ // macros to prevent defining things multiple times. If we include
+ // task_finder.c unconditionally, stap can't be used on systems
+ // without utrace.
+ s.op->newline() << "#include \"task_finder.c\"";
+
s.op->newline() << "struct stap_itrace_probe {";
s.op->indent(1);
s.op->newline() << "struct stap_task_finder_target tgt;";
@@ -7058,6 +7066,13 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline();
s.op->newline() << "/* ---- utrace probes ---- */";
+ // Note that we can potentially include task_finder.c multiple times
+ // in the generated code. That is OK, since task_finder.c has guard
+ // macros to prevent defining things multiple times. If we include
+ // task_finder.c unconditionally, stap can't be used on systems
+ // without utrace.
+ s.op->newline() << "#include \"task_finder.c\"";
+
s.op->newline() << "enum utrace_derived_probe_flags {";
s.op->indent(1);
s.op->newline() << "UDPF_NONE,";
@@ -7566,6 +7581,13 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "#include \"uprobes/uprobes.h\"";
s.op->newline() << "#endif";
+ // Note that we can potentially include task_finder.c multiple times
+ // in the generated code. That is OK, since task_finder.c has guard
+ // macros to prevent defining things multiple times. If we include
+ // task_finder.c unconditionally, stap can't be used on systems
+ // without utrace.
+ s.op->newline() << "#include \"task_finder.c\"";
+
s.op->newline() << "#ifndef MULTIPLE_UPROBES";
s.op->newline() << "#define MULTIPLE_UPROBES 256"; // maximum possible armed uprobes per process() probe point
// or apprx. max number of processes mapping a shared library