Seth Goldberg
2005-Aug-23 22:25 UTC
[dtrace-discuss] Duplication in dtrace''s forceload entries in /etc/system
Hi, If you have a custom kernel (and therefore have duplicates of everything in /kernel in your custom kernel) and have noticed that when you try to use anonymous tracing, dtrace adds multiple copies of the forceload directives to /etc/system, e.g.: * vvvv Added by DTrace * * The following forceload directives were added by dtrace(1M) to allow for * tracing during boot. If these directives are removed, the system will * continue to function, but tracing will not occur during boot as desired. * To remove these directives (and this block comment) automatically, run * "dtrace -A" without additional arguments. See the "Anonymous Tracing" * chapter of the Solaris Dynamic Tracing Guide for details. * forceload: drv/systrace forceload: drv/sdt forceload: drv/profile forceload: drv/lockstat forceload: drv/fbt forceload: drv/fasttrap forceload: drv/systrace forceload: drv/sdt forceload: drv/profile forceload: drv/lockstat forceload: drv/fbt forceload: drv/fasttrap forceload: drv/dtrace * ^^^^ Added by DTrace It''s because when libdtrace searches for providers, it searches the system module load paths and attempts to match module names with pseudo drivers to locate the providers, so it will match not only for the dtrace providers in, say /platform/sun4u/mykernel/..., but also for the "originals" in /kernel/... It''s no big whoop, as the additional forceloads just result in warning messages, but it was nice to find out where it was coming from. Check out: http://cvs.opensolaris.org/source/xref/usr/src/lib/libdtrace/common/dt_open.c#757 for the gory details. --S