aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lockstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/lockstat.h')
-rw-r--r--sys/sys/lockstat.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/sys/lockstat.h b/sys/sys/lockstat.h
index e53a7e4b88c8..1cb9a21198ce 100644
--- a/sys/sys/lockstat.h
+++ b/sys/sys/lockstat.h
@@ -90,15 +90,25 @@ SDT_PROBE_DECLARE(lockstat, , , thread__spin);
LOCKSTAT_RECORD0(probe, lp); \
} while (0)
+#define LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(probe, lp, c, wt, f, l, a) do { \
+ lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt, f, l); \
+ LOCKSTAT_RECORD1(probe, lp, a); \
+} while (0)
+
#define LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) do { \
lock_profile_release_lock(&(lp)->lock_object); \
LOCKSTAT_RECORD0(probe, lp); \
} while (0)
+#define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) do { \
+ lock_profile_release_lock(&(lp)->lock_object); \
+ LOCKSTAT_RECORD1(probe, lp, a); \
+} while (0)
+
extern int lockstat_enabled;
struct lock_object;
-extern uint64_t lockstat_nsecs(struct lock_object *);
+uint64_t lockstat_nsecs(struct lock_object *);
#else /* !KDTRACE_HOOKS */
@@ -111,9 +121,15 @@ extern uint64_t lockstat_nsecs(struct lock_object *);
#define LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(probe, lp, c, wt, f, l) \
lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt, f, l)
+#define LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(probe, lp, c, wt, f, l, a) \
+ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(probe, lp, c, wt, f, l)
+
#define LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) \
lock_profile_release_lock(&(lp)->lock_object)
+#define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \
+ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp)
+
#endif /* !KDTRACE_HOOKS */
#endif /* _KERNEL */
#endif /* _SYS_LOCKSTAT_H */