on 12/12/2011 19:05 Attilio Rao said the following: > More precisely, what do you think about the patch below? > I just didn't revert the moving of systm.h under param.h because Bruce > seems to prefer that. > > I'm starting test-compile right now, let me know your preference.
The patch looks good to me. > Index: sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > =================================================================== > --- sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > (revision 228438) > +++ sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c (working copy) > @@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintp > volatile uint16_t *flags; > hrtime_t now; > > + if (SCHEDULER_STOPPED()) > + return; > + I think that this could even be "panicstr != NULL", there is probably no use for DTrace at panic time. > #if defined(sun) > /* > * Kick out immediately if this CPU is still being born (in which case > Index: sys/security/mac/mac_priv.c > =================================================================== > --- sys/security/mac/mac_priv.c (revision 228438) > +++ sys/security/mac/mac_priv.c (working copy) > @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); > #include "opt_mac.h" > > #include <sys/param.h> > -#include <sys/systm.h> > #include <sys/kernel.h> > #include <sys/priv.h> > #include <sys/sdt.h> I would even keep this inclusion, just for the "why not" reason. > Index: sys/sys/lockstat.h > =================================================================== > --- sys/sys/lockstat.h (revision 228438) > +++ sys/sys/lockstat.h (working copy) > @@ -185,24 +185,17 @@ extern uint64_t lockstat_nsecs(void); > #define LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(probe, lp, c, wt, > f, l) do { \ > uint32_t id; \ > \ > - if (!SCHEDULER_STOPPED()) { \ > - lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt, \ > - f, l); \ > - if ((id = lockstat_probemap[(probe)])) \ > - (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, \ > - 0, 0); \ > - } \ > + lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt, f, l); \ > + if ((id = lockstat_probemap[(probe)])) \ > + (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); \ > } while (0) > > #define LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) do { > \ > uint32_t id; \ > \ > - if (!SCHEDULER_STOPPED()) { \ > - lock_profile_release_lock(&(lp)->lock_object); \ > - if ((id = lockstat_probemap[(probe)])) \ > - (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, \ > - 0, 0); \ > - } \ > + lock_profile_release_lock(&(lp)->lock_object); \ > + if ((id = lockstat_probemap[(probe)])) \ > + (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); \ > } while (0) > > #else /* !KDTRACE_HOOKS */ -- Andriy Gapon _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"