From: Kris Van Hees Date: Sun, 9 Sep 2012 21:18:42 +0000 (-0400) Subject: Change the DTrace startup handling (at boot time) for SDT. X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~185 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=25a478153dec14e9b29e0db33ac95b5236f39402;p=users%2Fjedix%2Flinux-maple.git Change the DTrace startup handling (at boot time) for SDT. The DTrace OS level handling was initialized at DTrace module load, which caused major indigestion on the side of the scheduler when SDT probe points at crucial locations in the scheduler were being patched by one CPU while another was trying to get some real work done. Even a nice stop_machine() based approach turned out not to be possible, because that *cough* depends on the scheduler also. Instead, the DTrace OS support is initialized from the Linux boot sequence, before SMP is enabled, which removes the complications altogether (and it is a lot cleaner and faster). We also call CPU-specific initialization for DTrace during the boot sequence, albeit *after* the CPUs have been identified for SMP, to ensure that we get accurate information. Renamed sdt_register.c to be dtrace_sdt.c (for consistency). And implemented a better patching of SDT probe points. Added a 'nosdt' kernel command line option to allow system wide diabling of SDT probe points (at the kernel level). This can be used when the patching of SDT probe points somehow causes a problem. Signed-off-by: Kris Van Hees --- diff --git a/dtrace/dtrace_dev.c b/dtrace/dtrace_dev.c index 35abbc81556a4..e2293bbb9e74f 100644 --- a/dtrace/dtrace_dev.c +++ b/dtrace/dtrace_dev.c @@ -1213,7 +1213,6 @@ int dtrace_dev_init(void) return rc; } - dtrace_os_init(); dtrace_ctf_forceload(); dtrace_modload = dtrace_module_loaded; @@ -1331,6 +1330,4 @@ void dtrace_dev_exit(void) misc_deregister(&dtrace_dev); dtrace_probe_exit(); - - dtrace_os_exit(); }