aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock_profile.h
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2007-04-03 18:36:27 +0000
committerKip Macy <kmacy@FreeBSD.org>2007-04-03 18:36:27 +0000
commit8289600ce7129cc2ef02f207a59aa8eb963ea088 (patch)
tree12d5becde7bab1d4a8107410a5d67b5c76aaa06a /sys/sys/lock_profile.h
parent832a21869c036b792a2968578bc364836b487a7a (diff)
downloadsrc-8289600ce7129cc2ef02f207a59aa8eb963ea088.tar.gz
src-8289600ce7129cc2ef02f207a59aa8eb963ea088.zip
skip call to _lock_profile_obtain_lock_success entirely if acquisition time is non-zero
(i.e. recursing or adding sharers)
Notes
Notes: svn path=/head/; revision=168315
Diffstat (limited to 'sys/sys/lock_profile.h')
-rw-r--r--sys/sys/lock_profile.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/lock_profile.h b/sys/sys/lock_profile.h
index 91f303206635..26ee57cc6ca5 100644
--- a/sys/sys/lock_profile.h
+++ b/sys/sys/lock_profile.h
@@ -129,12 +129,14 @@ static inline void lock_profile_obtain_lock_failed(struct lock_object *lo, int *
static inline void lock_profile_obtain_lock_success(struct lock_object *lo, int contested, uint64_t waittime, const char *file, int line)
{
- if (lock_prof_enable) {
+
+ /* don't reset the timer when/if recursing */
+ if (lock_prof_enable && lo->lo_profile_obj.lpo_acqtime == 0) {
#ifdef LOCK_PROFILING_FAST
if (contested == 0)
return;
#endif
- _lock_profile_obtain_lock_success(lo, contested, waittime, file, line);
+ _lock_profile_obtain_lock_success(lo, contested, waittime, file, line);
}
}
static inline void lock_profile_release_lock(struct lock_object *lo)