Author: fireball
Date: Mon Apr 21 13:33:23 2008
New Revision: 33091
URL:
http://svn.reactos.org/svn/reactos?rev=33091&view=rev
Log:
- Remove perf code from Ob SD Cache implementation.
Modified:
trunk/reactos/ntoskrnl/ob/obsdcach.c
Modified: trunk/reactos/ntoskrnl/ob/obsdcach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obsdcach.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] Mon Apr 21 13:33:23 2008
@@ -18,16 +18,6 @@
#define SD_CACHE_ENTRIES 0x100
OB_SD_CACHE_LIST ObsSecurityDescriptorCache[SD_CACHE_ENTRIES];
-ULONGLONG Cycles;
-ULONG TimeDelta;
-
-#define ObpSdCacheBeginPerfCount() \
- Cycles = __rdtsc();
-
-#define ObpSdCacheEndPerfCount() \
- TimeDelta += __rdtsc() - Cycles;
-
-
/* PRIVATE FUNCTIONS **********************************************************/
VOID
@@ -191,14 +181,12 @@
{
PSECURITY_DESCRIPTOR SecurityDescriptor;
PSECURITY_DESCRIPTOR_HEADER SdHeader;
- ObpSdCacheBeginPerfCount();
/* Get the SD */
SecurityDescriptor = ObjectHeader->SecurityDescriptor;
if (!SecurityDescriptor)
{
/* No SD, nothing to do */
- ObpSdCacheEndPerfCount();
return NULL;
}
@@ -213,7 +201,6 @@
/* Release the lock and return */
ObpReleaseObjectLock(ObjectHeader);
- ObpSdCacheEndPerfCount();
return SecurityDescriptor;
}
@@ -242,14 +229,12 @@
IN ULONG Count)
{
PSECURITY_DESCRIPTOR_HEADER SdHeader;
- ObpSdCacheBeginPerfCount();
/* Get the header */
SdHeader = ObpGetHeaderForSd(SecurityDescriptor);
/* Do the references */
InterlockedExchangeAdd((PLONG)&SdHeader->RefCount, Count);
- ObpSdCacheEndPerfCount();
}
/*++
@@ -278,7 +263,6 @@
LONG OldValue, NewValue;
ULONG Index;
POB_SD_CACHE_LIST CacheEntry;
- ObpSdCacheBeginPerfCount();
/* Get the header */
SdHeader = ObpGetHeaderForSd(SecurityDescriptor);
@@ -293,7 +277,7 @@
NewValue = InterlockedCompareExchange((PLONG)&SdHeader->RefCount,
OldValue - Count,
OldValue);
- if (NewValue == OldValue) ObpSdCacheEndPerfCount(); return;
+ if (NewValue == OldValue) return;
/* Try again */
OldValue = NewValue;
@@ -325,7 +309,6 @@
ObpSdReleaseLock(CacheEntry);
}
- ObpSdCacheEndPerfCount();
}
/*++
@@ -359,7 +342,6 @@
POB_SD_CACHE_LIST CacheEntry;
BOOLEAN Result;
PLIST_ENTRY NextEntry;
- ObpSdCacheBeginPerfCount();
/* Get the length */
Length = RtlLengthSecurityDescriptor(InputSecurityDescriptor);
@@ -418,7 +400,6 @@
/* Free anything that we may have had to create */
if (NewHeader) ExFreePool(NewHeader);
- ObpSdCacheEndPerfCount();
return STATUS_SUCCESS;
}
@@ -453,7 +434,6 @@
/* Return the SD*/
*OutputSecurityDescriptor = &NewHeader->SecurityDescriptor;
- ObpSdCacheEndPerfCount();
return STATUS_SUCCESS;
}