Date: Thu, 16 Mar 2017 07:20:32 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315389 - stable/11/sys/sys Message-ID: <201703160720.v2G7KWpd099864@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Mar 16 07:20:32 2017 New Revision: 315389 URL: https://svnweb.freebsd.org/changeset/base/315389 Log: MFC r313453: Implement LOCKSTAT_OOL_PROFILE_ENABLED For use in uninlined locking primitives to decide whether lockstat or profiling needs to be taken care of. Modified: stable/11/sys/sys/lockstat.h stable/11/sys/sys/sdt.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/lockstat.h ============================================================================== --- stable/11/sys/sys/lockstat.h Thu Mar 16 07:11:35 2017 (r315388) +++ stable/11/sys/sys/lockstat.h Thu Mar 16 07:20:32 2017 (r315389) @@ -107,10 +107,6 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) -#ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) SDT_PROBE_ENABLED(lockstat, , , probe) -#endif - struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -134,10 +130,16 @@ 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) 0 +#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 #endif -#endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */ Modified: stable/11/sys/sys/sdt.h ============================================================================== --- stable/11/sys/sys/sdt.h Thu Mar 16 07:11:35 2017 (r315388) +++ stable/11/sys/sys/sdt.h Thu Mar 16 07:20:32 2017 (r315389) @@ -86,6 +86,7 @@ #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) +#define SDT_PROBE_ENABLED(prov, mod, func, name) 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703160720.v2G7KWpd099864>