Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2016 03:13:11 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309786 - head/sys/cddl/dev/fbt
Message-ID:  <201612100313.uBA3DBEK016910@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Dec 10 03:13:11 2016
New Revision: 309786
URL: https://svnweb.freebsd.org/changeset/base/309786

Log:
  Don't create FBT probes for lock owner methods.
  
  These functions may be called in DTrace probe context, so they cannot be
  safely traced. Moreover, they are currently only used by DTrace, so their
  corresponding FBT probes are not particularly useful.
  
  MFC after:	2 weeks

Modified:
  head/sys/cddl/dev/fbt/fbt.c

Modified: head/sys/cddl/dev/fbt/fbt.c
==============================================================================
--- head/sys/cddl/dev/fbt/fbt.c	Sat Dec 10 03:11:05 2016	(r309785)
+++ head/sys/cddl/dev/fbt/fbt.c	Sat Dec 10 03:13:11 2016	(r309786)
@@ -127,6 +127,15 @@ fbt_excluded(const char *name)
 	}
 
 	/*
+	 * Lock owner methods may be called from probe context.
+	 */
+	if (strcmp(name, "owner_mtx") == 0 ||
+	    strcmp(name, "owner_rm") == 0 ||
+	    strcmp(name, "owner_rw") == 0 ||
+	    strcmp(name, "owner_sx") == 0)
+		return (1);
+
+	/*
 	 * When DTrace is built into the kernel we need to exclude
 	 * the FBT functions from instrumentation.
 	 */



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