Add runtime accounting and DPC throttling
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 34s
Builds / ExectOS (i686, release) (push) Successful in 32s
Builds / ExectOS (amd64, debug) (push) Successful in 1m2s
Builds / ExectOS (i686, debug) (push) Successful in 1m0s

This commit is contained in:
2026-05-30 23:53:47 +02:00
parent 5a5604c35d
commit 7d8b33390a
3 changed files with 126 additions and 0 deletions

View File

@@ -133,6 +133,15 @@
#define CONTEXT_FLOATING_POINT (CONTEXT_ARCHITECTURE | 0x08)
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARCHITECTURE | 0x10)
/* Clock control flags */
#define CLOCK_QUANTUM_DECREMENT 3
/* DPC definitions */
#define DPC_ADJUST_THRESHOLD 20
#define DPC_IDEAL_RATE 20
#define DPC_MAXIMUM_QUEUE_DEPTH 4
#define DPC_MINIMUM_RATE 3
/* Interrupt request levels definitions */
#define PASSIVE_LEVEL 0
#define LOW_LEVEL 0
@@ -564,7 +573,11 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
KSPIN_LOCK_QUEUE LockQueue[MaximumLock];
KDPC_DATA DpcData[2];
PVOID DpcStack;
LONG MaximumDpcQueueDepth;
ULONG DpcRequestRate;
BOOLEAN DpcInterruptRequested;
VOLATILE BOOLEAN DpcRoutineActive;
ULONG DpcLastCount;
VOLATILE ULONG_PTR TimerHand;
VOLATILE ULONG_PTR TimerRequest;
ULONG_PTR MultiThreadProcessorSet;
@@ -574,6 +587,7 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
ULONG UserTime;
ULONG DpcTime;
ULONG InterruptTime;
ULONG AdjustDpcThreshold;
PROCESSOR_POWER_STATE PowerState;
ULONG ProfilingCountdown;
} KPROCESSOR_CONTROL_BLOCK, *PKPROCESSOR_CONTROL_BLOCK;

View File

@@ -155,6 +155,15 @@
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARCHITECTURE | 0x10)
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_ARCHITECTURE | 0x20)
/* Clock control flags */
#define CLOCK_QUANTUM_DECREMENT 3
/* DPC definitions */
#define DPC_ADJUST_THRESHOLD 20
#define DPC_IDEAL_RATE 20
#define DPC_MAXIMUM_QUEUE_DEPTH 4
#define DPC_MINIMUM_RATE 3
/* Interrupt request levels definitions */
#define PASSIVE_LEVEL 0
#define LOW_LEVEL 0
@@ -524,7 +533,11 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
ULONG_PTR MultiThreadProcessorSet;
KDPC_DATA DpcData[2];
PVOID DpcStack;
LONG MaximumDpcQueueDepth;
ULONG DpcRequestRate;
BOOLEAN DpcInterruptRequested;
VOLATILE BOOLEAN DpcRoutineActive;
ULONG DpcLastCount;
VOLATILE ULONG_PTR TimerHand;
VOLATILE ULONG_PTR TimerRequest;
SINGLE_LIST_ENTRY DeferredReadyListHead;
@@ -533,6 +546,7 @@ typedef struct _KPROCESSOR_CONTROL_BLOCK
ULONG UserTime;
ULONG DpcTime;
ULONG InterruptTime;
ULONG AdjustDpcThreshold;
PROCESSOR_POWER_STATE PowerState;
ULONG ProfilingCountdown;
} KPROCESSOR_CONTROL_BLOCK, *PKPROCESSOR_CONTROL_BLOCK;