summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-03-07 12:11:45 -0500
committerFrank Ch. Eigler <fche@elastic.org>2009-03-07 12:11:45 -0500
commitbc9a523d505c604c187dd2e81be1e24ec877d1af (patch)
tree2967fb1897b89935b2da8b2ff6a5042e5d3a14d3
parentcb481ce9062cf0175bf5a86ef91bf45e7885162e (diff)
downloadsystemtap-steved-bc9a523d505c604c187dd2e81be1e24ec877d1af.tar.gz
systemtap-steved-bc9a523d505c604c187dd2e81be1e24ec877d1af.tar.xz
systemtap-steved-bc9a523d505c604c187dd2e81be1e24ec877d1af.zip
Tweak tracepoint logic to run on tracepoint_synchronize_unregister()-less RHEL5
-rw-r--r--tapsets.cxx17
-rw-r--r--translate.cxx5
2 files changed, 18 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index defaf385..5ea3982d 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -9764,9 +9764,15 @@ tracepoint_derived_probe_group::emit_module_init (systemtap_session &s)
<< "(enter_tracepoint_probe_" << i << ");";
s.op->newline(-2) << "}";
}
- s.op->newline() << "if (rc)";
- s.op->newline(1) << "tracepoint_synchronize_unregister();";
- s.op->indent(-1);
+
+ // This would be technically proper (on those autoconf-detectable
+ // kernels that include this function in tracepoint.h), however we
+ // already make several calls to synchronze_sched() during our
+ // shutdown processes.
+
+ // s.op->newline() << "if (rc)";
+ // s.op->newline(1) << "tracepoint_synchronize_unregister();";
+ // s.op->indent(-1);
}
@@ -9780,7 +9786,10 @@ tracepoint_derived_probe_group::emit_module_exit (systemtap_session& s)
for (unsigned i = 0; i < probes.size(); ++i)
s.op->newline() << "unregister_trace_" << probes[i]->tracepoint_name
<< "(enter_tracepoint_probe_" << i << ");";
- s.op->newline() << "tracepoint_synchronize_unregister();";
+
+ // Not necessary: see above.
+
+ // s.op->newline() << "tracepoint_synchronize_unregister();";
}
diff --git a/translate.cxx b/translate.cxx
index 23a24100..c679e0f1 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -1236,6 +1236,11 @@ c_unparser::emit_module_init ()
o->newline() << getvar (v).fini();
}
+ // For any partially registered/unregistered kernel facilities.
+ o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED";
+ o->newline() << "synchronize_sched();";
+ o->newline() << "#endif";
+
o->newline() << "return rc;";
o->newline(-1) << "}\n";
}