]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Change the DTrace startup handling (at boot time) for SDT.
authorKris Van Hees <kris.van.hees@oracle.com>
Sun, 9 Sep 2012 21:18:42 +0000 (17:18 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Sun, 9 Sep 2012 21:18:42 +0000 (17:18 -0400)
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 <kris.van.hees@oracle.com>
dtrace/dtrace_dev.c

index 35abbc81556a4a61601278ead005358dd95d97a2..e2293bbb9e74fe8c66bf66c4ff0ea344fdac870c 100644 (file)
@@ -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();
 }