Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jul 2014 19:25:24 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
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
Message-ID:  <201407031925.s63JPOWW033236@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407031925.s63JPOWW033236>