#ifndef _NTEXAPI_H
// private
//
// Query notes:
//
// This class is only serviced by NtQuerySystemInformationEx. The plain NtQuerySystemInformation
// form fails with STATUS_INVALID_PARAMETER at every buffer size. The input buffer is a
// USHORT ProcessorGroup.
//
// The output is a bare array of one structure per active processor in the group, with no header and
// no offset table. An undersized buffer fails with either STATUS_INFO_LENGTH_MISMATCH or
// STATUS_BUFFER_TOO_SMALL depending on how short it is, so a retry loop must accept both. Both set
// ReturnLength to the required size.
//
// The cycle counts are attributed to a coarse frequency band and efficiency class for heterogeneous
// scheduler telemetry. They are not a continuous unhalted cycle counter and carry no delivered
// frequency resolution, so they cannot be used to compute processor utility or performance; use
// SystemProcessorPerformanceDistribution for that. On a homogeneous processor every cycle lands in
// Cycles[SystemProcessorCycleStatsBucketHighestFrequency][SystemProcessorCycleStatsEfficiencyClassPrimary]
// and the remaining cells stay zero.
//
/**
* The SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION structure contains per-processor cycle counts bucketed by frequency band and architectural efficiency class for heterogeneous scheduler telemetry (SystemProcessorCycleStatsInformation, queried via NtQuerySystemInformationEx).
*/
typedef struct _SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION
{
//
// First index is bucket (see: PoGetFrequencyBucket) selected based on latest frequency percent
// using _KPRCB.PowerState.FrequencyBucketThresholds.
//
// Second index is _KPRCB.PowerState.ArchitecturalEfficiencyClass, accounting for architecture
// dependent KeHeteroSystem and using _KPRCB.PowerState.EarlyBootArchitecturalEfficiencyClass
// instead, when appropriate.
//
ULONGLONG Cycles[SystemProcessorCycleStatsBucketMax][SystemProcessorCycleStatsEfficiencyClassMax];
} SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION, *PSYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION;
View code on GitHubNo description available.