diff options
author | jeff <jeff@FreeBSD.org> | 2009-03-15 08:03:54 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2009-03-15 08:03:54 +0000 |
commit | 9fedeedb8d3b7b5964f22521c2fa9bf23fcfa02d (patch) | |
tree | d7be9c96e5a5079b2c9fae273c6023bcf3781b8d /sys/kern/kern_lock.c | |
parent | ee1ec823f64df1e1cbfad16666bceeb4419bfa25 (diff) | |
download | FreeBSD-src-9fedeedb8d3b7b5964f22521c2fa9bf23fcfa02d.zip FreeBSD-src-9fedeedb8d3b7b5964f22521c2fa9bf23fcfa02d.tar.gz |
- Wrap lock profiling state variables in #ifdef LOCK_PROFILING blocks.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index d3b9ed8..f19e249 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -333,16 +333,17 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, const char *wmesg, int pri, int timo, const char *file, int line) { GIANT_DECLARE; - uint64_t waittime; struct lock_class *class; const char *iwmesg; uintptr_t tid, v, x; u_int op; - int contested, error, ipri, itimo, queue, wakeup_swapper; + int error, ipri, itimo, queue, wakeup_swapper; +#ifdef LOCK_PROFILING + uint64_t waittime = 0; + int contested = 0; +#endif - contested = 0; error = 0; - waittime = 0; tid = (uintptr_t)curthread; op = (flags & LK_TYPE_MASK); iwmesg = (wmesg == LK_WMESG_DEFAULT) ? lk->lock_object.lo_name : wmesg; |