summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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";
}