summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/runtime.h2
-rw-r--r--runtime/sym.c2
-rw-r--r--runtime/task_finder.c7
-rw-r--r--tapsets.cxx21
4 files changed, 6 insertions, 26 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 70fe4dce..0a656b78 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -89,6 +89,8 @@ 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/runtime/sym.c b/runtime/sym.c
index 8de01bc8..a2cdd0ff 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -30,7 +30,6 @@ static void _stp_sym_init(void)
}
}
-#ifdef STP_NEED_VMA_TRACKER
/* Callback that needs to be registered (in tapsets.cxx for
emit_module_init) for every user task path or pid for which we
might need symbols or unwind info. */
@@ -77,7 +76,6 @@ static int _stp_tf_munmap_cb(struct stap_task_finder_target *tgt,
stap_remove_vma_map_info(tsk->group_leader, addr, addr + length, 0);
return 0;
}
-#endif
/* XXX: this needs to be address-space-specific. */
static unsigned long _stp_module_relocate(const char *module, const char *section, unsigned long offset)
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 69b6246b..55a896ee 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -2,8 +2,9 @@
#define TASK_FINDER_C
#if ! defined(CONFIG_UTRACE)
-#error "Need CONFIG_UTRACE!"
-#endif
+/* Dummy definitions for use in sym.c */
+struct stap_task_finder_target { };
+#else
#include <linux/utrace.h>
@@ -1324,5 +1325,5 @@ stap_stop_task_finder(void)
debug_task_finder_report();
}
-
+#endif /* defined(CONFIG_UTRACE) */
#endif /* TASK_FINDER_C */
diff --git a/tapsets.cxx b/tapsets.cxx
index 32cd8494..2316a777 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -6486,13 +6486,6 @@ 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;";
@@ -7077,13 +7070,6 @@ 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,";
@@ -7592,13 +7578,6 @@ 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