KeQuerySchedulingGroupHistory
VOID __stdcall KeQuerySchedulingGroupHistory(
_KSCHEDULING_GROUP *SchedulingGroup,
UINT64 *OverQuotaHistory,
UINT64 *IntervalLength,
UINT64 *NumberOfIntervals){
unsigned int v8;
volatile unsigned __int64 *p_OverQuotaHistory;
__int64 v10;
volatile unsigned __int64 v11;
LARGE_INTEGER v12;
unsigned __int64 v13;
unsigned __int64 QuadPart;
unsigned __int64 v15;
struct _KLOCK_QUEUE_HANDLE LockHandle;
union _LARGE_INTEGER PerformanceFrequency;
PerformanceFrequency.QuadPart = 0i64;
memset(&LockHandle, 0, sizeof(LockHandle));
KeAcquireInStackQueuedSpinLock(&KiSchedulingGroupLock, &LockHandle);
v8 = KeNumberProcessors_0;
*OverQuotaHistory = 0i64;
if( v8 )
{
p_OverQuotaHistory = &SchedulingGroup->PerProcessor[0].OverQuotaHistory;
v10 = v8;
do
{
v11 = *p_OverQuotaHistory;
p_OverQuotaHistory += 53;
*OverQuotaHistory |= v11;
--v10;
}
while( v10 );
}
*(_DWORD *)IntervalLength = PsDfssGenerationLengthMS;
v12 = KeQueryPerformanceCounter(&PerformanceFrequency);
v13 = *(unsigned int *)IntervalLength;
QuadPart = v12.QuadPart;
v15 = 1000 * (v12.QuadPart - SchedulingGroup->QueryHistoryTimeStamp);
SchedulingGroup->QueryHistoryTimeStamp = QuadPart;
*(_DWORD *)NumberOfIntervals = v15 / PerformanceFrequency.QuadPart / v13;
KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
__writecr8(LockHandle.OldIrql);
}Referenced by:
PspQueryRateControlHistory