Author: mjg Date: Wed Feb 8 19:25:58 2017 New Revision: 313453 URL: https://svnweb.freebsd.org/changeset/base/313453
Log: Implement LOCKSTAT_OOL_PROFILE_ENABLED For use in uninlined locking primitives to decide whether lockstat or profiling needs to be taken care of. Modified: head/sys/sys/lockstat.h head/sys/sys/sdt.h Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/lockstat.h Wed Feb 8 19:25:58 2017 (r313453) @@ -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: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/sdt.h Wed Feb 8 19:25:58 2017 (r313453) @@ -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) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"