Remove checking from non-debug builds. The original requirements
called for checking all the time but this is turning out to be
too expensive. Times in NS/Cycles (exclusive lock, uncontended):
Before: 44/177
After: 39/103
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
NULL); // non-stats
}
- if (MXRecLockCount(&lock->recursiveLock) > 1) {
+ if (vmx86_debug && (MXRecLockCount(&lock->recursiveLock) > 1)) {
MXUserDumpAndPanic(&lock->header,
"%s: Acquire on an acquired exclusive lock\n",
__FUNCTION__);
}
}
- if (!MXRecLockIsOwner(&lock->recursiveLock)) {
+ if (vmx86_debug && !MXRecLockIsOwner(&lock->recursiveLock)) {
uint32 lockCount = MXRecLockCount(&lock->recursiveLock);
MXUserDumpAndPanic(&lock->header,
}
}
- if (!MXRecLockIsOwner(&lock->recursiveLock)) {
+ if (vmx86_debug && !MXRecLockIsOwner(&lock->recursiveLock)) {
uint32 lockCount = MXRecLockCount(&lock->recursiveLock);
MXUserDumpAndPanic(&lock->header,