+2008-11-26 Frank Ch. Eigler <fche@elastic.org>
+
+ * translate.cxx (emit_module_exit): Call synchronize_sched during
+ module shutdown if it's available.
+ * buildrun.cxx (compile_pass): Test for it.
+
2008-11-25 Frank Ch. Eigler <fche@elastic.org>
PR 7046.
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-uaccess.c, -DSTAPCONF_LINUX_UACCESS_H,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl;
+ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl;
+
#if 0
/* NB: For now, the performance hit of probe_kernel_read/write (vs. our
* homegrown safe-access functions) is deemed undesireable, so we'll skip
+2008-11-26 Frank Ch. Eigler <fche@elastic.org>
+
+ * autoconf-synchronize-sched.c: New file.
+
2008-11-25 Frank Ch. Eigler <fche@elastic.org>
PR 7046.
--- /dev/null
+#include <linux/sched.h>
+
+void foo (void)
+{
+ synchronize_sched ();
+}
o->newline () << "yield ();"; // aka schedule() and then some
o->newline(-2) << "} while (holdon);";
+ //
+ o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED";
+ o->newline() << "synchronize_sched();";
+ o->newline() << "#endif";
+
// XXX: might like to have an escape hatch, in case some probe is
// genuinely stuck somehow
s.op->newline() << "#include \"stat.c\"";
s.op->newline() << "#include <linux/string.h>";
s.op->newline() << "#include <linux/timer.h>";
+ s.op->newline() << "#include <linux/sched.h>";
s.op->newline() << "#include <linux/delay.h>";
s.op->newline() << "#include <linux/profile.h>";
s.op->newline() << "#include <linux/random.h>";