diff options
author | David Smith <dsmith@redhat.com> | 2009-04-08 12:41:55 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-04-08 12:41:55 -0500 |
commit | 55c0f2bfefb04915622dd3688bba59da1addaec8 (patch) | |
tree | c97ac52bf791b18ad66b554e0c3d9070abced0ef /tapsets.cxx | |
parent | 53ad27be6e5829546dba9a61cfee1d043eaafa70 (diff) | |
download | systemtap-steved-55c0f2bfefb04915622dd3688bba59da1addaec8.tar.gz systemtap-steved-55c0f2bfefb04915622dd3688bba59da1addaec8.tar.xz systemtap-steved-55c0f2bfefb04915622dd3688bba59da1addaec8.zip |
Only includes task_finder.c when needed.
2009-04-08 David Smith <dsmith@redhat.com>
* tapsets.cxx (itrace_derived_probe_group::emit_module_decls):
Added inclusion of task_finder.c back. Unconditionally including
it when not needed causes all systemtap scripts to fail on kernels
with no utrace support.
(utrace_derived_probe_group::emit_module_decls): Ditto.
(uprobe_derived_probe_group::emit_module_decls): Ditto.
* runtime/runtime.h: Removed unconditional inclusion of
task_finder.c.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 04402a27..a7bda5f5 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 |