aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sx.c')
-rw-r--r--sys/kern/kern_sx.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index ee6c01bb70fd..1ba1ab2aff53 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -288,8 +288,8 @@ sx_try_slock_(struct sx *sx, const char *file, int line)
if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) {
LOCK_LOG_TRY("SLOCK", &sx->lock_object, 0, 1, file, line);
WITNESS_LOCK(&sx->lock_object, LOP_TRYLOCK, file, line);
- LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(sx__acquire,
- sx, 0, 0, file, line);
+ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire,
+ sx, 0, 0, file, line, LOCKSTAT_READER);
curthread->td_locks++;
return (1);
}
@@ -351,8 +351,8 @@ sx_try_xlock_(struct sx *sx, const char *file, int line)
WITNESS_LOCK(&sx->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK,
file, line);
if (!sx_recursed(sx))
- LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(sx__acquire,
- sx, 0, 0, file, line);
+ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire,
+ sx, 0, 0, file, line, LOCKSTAT_WRITER);
curthread->td_locks++;
}
@@ -728,8 +728,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, const char *file,
(state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state));
#endif
if (!error)
- LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(sx__acquire, sx,
- contested, waittime, file, line);
+ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx,
+ contested, waittime, file, line, LOCKSTAT_WRITER);
GIANT_RESTORE();
return (error);
}
@@ -992,8 +992,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *file, int line)
(state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state));
#endif
if (error == 0)
- LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(sx__acquire, sx, contested,
- waittime, file, line);
+ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx,
+ contested, waittime, file, line, LOCKSTAT_READER);
GIANT_RESTORE();
return (error);
}