From owner-svn-src-stable@freebsd.org Thu Mar 16 07:46:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48982D0F6E9; Thu, 16 Mar 2017 07:46:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 17F41192D; Thu, 16 Mar 2017 07:46:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G7kP6w012174; Thu, 16 Mar 2017 07:46:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G7kPbt012173; Thu, 16 Mar 2017 07:46:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201703160746.v2G7kPbt012173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Mar 2017 07:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315391 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 07:46:26 -0000 Author: mjg Date: Thu Mar 16 07:46:24 2017 New Revision: 315391 URL: https://svnweb.freebsd.org/changeset/base/315391 Log: MFC r313874: Make inline lockstat checks just inspect lockstat_enabled There is no correctness issue and this lets the kernel just test one typically false variable. Modified: stable/11/sys/sys/lockstat.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/lockstat.h ============================================================================== --- stable/11/sys/sys/lockstat.h Thu Mar 16 07:40:33 2017 (r315390) +++ stable/11/sys/sys/lockstat.h Thu Mar 16 07:46:24 2017 (r315391) @@ -107,6 +107,13 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) +#ifndef LOCK_PROFILING +#define LOCKSTAT_PROFILE_ENABLED(probe) __predict_false(lockstat_enabled) +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) LOCKSTAT_PROFILE_ENABLED(probe) +#else +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) 1 +#endif + struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -130,16 +137,12 @@ uint64_t lockstat_nsecs(struct lock_obje #define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) -#endif /* !KDTRACE_HOOKS */ - #ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) \ - SDT_PROBE_ENABLED(lockstat, , , probe) -#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) \ - SDT_PROBE_ENABLED(lockstat, , , probe) -#else -#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) 1 +#define LOCKSTAT_PROFILE_ENABLED(probe) 0 #endif +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) 1 + +#endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */