Add PrcbLock and runtime counters to KPROCESSOR_CONTROL_BLOCK
This commit is contained in:
@@ -560,6 +560,7 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
|
||||
ULONG_PTR SetMember;
|
||||
CPU_IDENTIFICATION CpuId;
|
||||
KPROCESSOR_STATE ProcessorState;
|
||||
KSPIN_LOCK PrcbLock;
|
||||
KSPIN_LOCK_QUEUE LockQueue[MaximumLock];
|
||||
KDPC_DATA DpcData[2];
|
||||
PVOID DpcStack;
|
||||
@@ -567,6 +568,11 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
|
||||
VOLATILE ULONG_PTR TimerRequest;
|
||||
ULONG_PTR MultiThreadProcessorSet;
|
||||
SINGLE_LIST_ENTRY DeferredReadyListHead;
|
||||
ULONG InterruptCount;
|
||||
ULONG KernelTime;
|
||||
ULONG UserTime;
|
||||
ULONG DpcTime;
|
||||
ULONG InterruptTime;
|
||||
PROCESSOR_POWER_STATE PowerState;
|
||||
ULONG ProfilingCountdown;
|
||||
} KPROCESSOR_CONTROL_BLOCK, *PKPROCESSOR_CONTROL_BLOCK;
|
||||
|
||||
@@ -519,6 +519,7 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
|
||||
ULONG_PTR SetMember;
|
||||
CPU_IDENTIFICATION CpuId;
|
||||
KPROCESSOR_STATE ProcessorState;
|
||||
KSPIN_LOCK PrcbLock;
|
||||
KSPIN_LOCK_QUEUE LockQueue[MaximumLock];
|
||||
ULONG_PTR MultiThreadProcessorSet;
|
||||
KDPC_DATA DpcData[2];
|
||||
@@ -526,6 +527,11 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
|
||||
VOLATILE BOOLEAN DpcRoutineActive;
|
||||
VOLATILE ULONG_PTR TimerRequest;
|
||||
SINGLE_LIST_ENTRY DeferredReadyListHead;
|
||||
ULONG InterruptCount;
|
||||
ULONG KernelTime;
|
||||
ULONG UserTime;
|
||||
ULONG DpcTime;
|
||||
ULONG InterruptTime;
|
||||
PROCESSOR_POWER_STATE PowerState;
|
||||
ULONG ProfilingCountdown;
|
||||
} KPROCESSOR_CONTROL_BLOCK, *PKPROCESSOR_CONTROL_BLOCK;
|
||||
|
||||
@@ -152,6 +152,7 @@ KE::SystemTime::UpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||
IN KRUNLEVEL RunLevel)
|
||||
{
|
||||
LARGE_INTEGER InterruptTime, SystemTime;
|
||||
PKPROCESSOR_CONTROL_BLOCK ControlBlock;
|
||||
LONG CurrentTickOffset;
|
||||
|
||||
/* Advance the global interrupt time on every hardware tick */
|
||||
@@ -179,4 +180,10 @@ KE::SystemTime::UpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||
/* Update processor and thread runtime accounting */
|
||||
KE::Dispatcher::UpdateRunTime(TrapFrame, RunLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Increment the interrupt count */
|
||||
ControlBlock = KE::Processor::GetCurrentProcessorControlBlock();
|
||||
ControlBlock->InterruptCount++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user