1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

locks: change sleep_cnt and spin_cnt types to u_int

Both variables are uint64_t, but they only count spins or sleeps.
All reasonable values which we can get here comfortably hit in 32-bit range.

Suggested by: kib
MFC after:	1 week
This commit is contained in:
Mateusz Guzik 2016-07-31 12:11:55 +00:00
parent b7ff4d59de
commit 61852185ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303584
3 changed files with 10 additions and 10 deletions

View File

@ -409,8 +409,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t tid, int opts,
uint64_t waittime = 0;
#endif
#ifdef KDTRACE_HOOKS
uint64_t spin_cnt = 0;
uint64_t sleep_cnt = 0;
u_int spin_cnt = 0;
u_int sleep_cnt = 0;
int64_t sleep_time = 0;
int64_t all_time = 0;
#endif

View File

@ -357,8 +357,8 @@ __rw_rlock(volatile uintptr_t *c, const char *file, int line)
uintptr_t v;
#ifdef KDTRACE_HOOKS
uintptr_t state;
uint64_t spin_cnt = 0;
uint64_t sleep_cnt = 0;
u_int spin_cnt = 0;
u_int sleep_cnt = 0;
int64_t sleep_time = 0;
int64_t all_time = 0;
#endif
@ -742,8 +742,8 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file,
#endif
#ifdef KDTRACE_HOOKS
uintptr_t state;
uint64_t spin_cnt = 0;
uint64_t sleep_cnt = 0;
u_int spin_cnt = 0;
u_int sleep_cnt = 0;
int64_t sleep_time = 0;
int64_t all_time = 0;
#endif

View File

@ -515,8 +515,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, const char *file,
int error = 0;
#ifdef KDTRACE_HOOKS
uintptr_t state;
uint64_t spin_cnt = 0;
uint64_t sleep_cnt = 0;
u_int spin_cnt = 0;
u_int sleep_cnt = 0;
int64_t sleep_time = 0;
int64_t all_time = 0;
#endif
@ -820,8 +820,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *file, int line)
int error = 0;
#ifdef KDTRACE_HOOKS
uintptr_t state;
uint64_t spin_cnt = 0;
uint64_t sleep_cnt = 0;
u_int spin_cnt = 0;
u_int sleep_cnt = 0;
int64_t sleep_time = 0;
int64_t all_time = 0;
#endif