From owner-svn-src-head@FreeBSD.ORG Thu Jul 3 19:25:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE37C1E5; Thu, 3 Jul 2014 19:25:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB2A12B95; Thu, 3 Jul 2014 19:25:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63JPO23033237; Thu, 3 Jul 2014 19:25:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63JPOWW033236; Thu, 3 Jul 2014 19:25:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407031925.s63JPOWW033236@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 3 Jul 2014 19:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268231 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 19:25:24 -0000 Author: pfg Date: Thu Jul 3 19:25:24 2014 New Revision: 268231 URL: http://svnweb.freebsd.org/changeset/base/268231 Log: Merge from OpenSolaris (30-Jun-2009): 6851093 system drops to kmdb with anonymous dtrace probes + kmdb This has no effect on FreeBSD (code is ifdef'ed) but is useful as reference for future merges. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Jul 3 19:07:37 2014 (r268230) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Jul 3 19:25:24 2014 (r268231) @@ -16750,7 +16750,7 @@ dtrace_open(struct cdev *dev, int oflags if (state == NULL) { #if defined(sun) - if (--dtrace_opens == 0) + if (--dtrace_opens == 0 && dtrace_anon.dta_enabling == NULL) (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); #else --dtrace_opens; @@ -16806,7 +16806,11 @@ dtrace_dtr(void *data) ASSERT(dtrace_opens > 0); #if defined(sun) - if (--dtrace_opens == 0) + /* + * Only relinquish control of the kernel debugger interface when there + * are no consumers and no anonymous enablings. + */ + if (--dtrace_opens == 0 && dtrace_anon.dta_enabling == NULL) (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); #else --dtrace_opens;