From owner-svn-src-all@FreeBSD.ORG Mon Dec 12 23:29:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28D0B1065672; Mon, 12 Dec 2011 23:29:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CCAA8FC12; Mon, 12 Dec 2011 23:29:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBCNTWiw023138; Mon, 12 Dec 2011 23:29:32 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBCNTWL9023134; Mon, 12 Dec 2011 23:29:32 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201112122329.pBCNTWL9023134@svn.freebsd.org> From: Attilio Rao Date: Mon, 12 Dec 2011 23:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228448 - in head/sys: cddl/contrib/opensolaris/uts/common/dtrace security/mac sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2011 23:29:33 -0000 Author: attilio Date: Mon Dec 12 23:29:32 2011 New Revision: 228448 URL: http://svn.freebsd.org/changeset/base/228448 Log: Revert the approach for skipping lockstat_probe_func call when doing lock_success/lock_failure, introduced in r228424, by directly skipping in dtrace_probe. This mainly helps in avoiding namespace pollution and thus lockstat.h dependency by systm.h. As an added bonus, this also helps in MFC case. Reviewed by: avg MFC after: 3 months (or never) X-MFC: r228424 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/security/mac/mac_priv.c head/sys/sys/lockstat.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Dec 12 22:01:33 2011 (r228447) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Dec 12 23:29:32 2011 (r228448) @@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t a volatile uint16_t *flags; hrtime_t now; + if (panicstr != NULL) + return; + #if defined(sun) /* * Kick out immediately if this CPU is still being born (in which case Modified: head/sys/security/mac/mac_priv.c ============================================================================== --- head/sys/security/mac/mac_priv.c Mon Dec 12 22:01:33 2011 (r228447) +++ head/sys/security/mac/mac_priv.c Mon Dec 12 23:29:32 2011 (r228448) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mac.h" #include -#include #include #include #include Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Mon Dec 12 22:01:33 2011 (r228447) +++ head/sys/sys/lockstat.h Mon Dec 12 23:29:32 2011 (r228448) @@ -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 */