Nota
O acesso a esta página requer autorização. Pode tentar iniciar sessão ou alterar os diretórios.
O acesso a esta página requer autorização. Pode tentar alterar os diretórios.
Recupera contadores de desempenho para um processador virtual.
Sintaxe
HRESULT
WINAPI
WHvGetVirtualProcessorCounters(
_In_ WHV_PARTITION_HANDLE Partition,
_In_ UINT32 VpIndex,
_In_ WHV_PROCESSOR_COUNTER_SET CounterSet,
_Out_writes_bytes_to_(BufferSizeInBytes, *BytesWritten) VOID* Buffer,
_In_ UINT32 BufferSizeInBytes,
_Out_opt_ UINT32* BytesWritten
);
typedef enum WHV_PROCESSOR_COUNTER_SET
{
WHvProcessorCounterSetRuntime,
WHvProcessorCounterSetIntercepts,
WHvProcessorCounterSetEvents,
WHvProcessorCounterSetApic,
} WHV_PROCESSOR_COUNTER_SET;
typedef struct WHV_PROCESSOR_RUNTIME_COUNTERS
{
UINT64 TotalRuntime100ns;
UINT64 HypervisorRuntime100ns;
} WHV_PROCESSOR_RUNTIME_COUNTERS;
typedef struct WHV_PROCESSOR_INTERCEPT_COUNTER
{
UINT64 Count;
UINT64 Time100ns;
} WHV_PROCESSOR_INTERCEPT_COUNTER;
typedef struct WHV_PROCESSOR_INTERCEPT_COUNTERS
{
WHV_PROCESSOR_INTERCEPT_COUNTER PageInvalidations;
WHV_PROCESSOR_INTERCEPT_COUNTER ControlRegisterAccesses;
WHV_PROCESSOR_INTERCEPT_COUNTER IoInstructions;
WHV_PROCESSOR_INTERCEPT_COUNTER HaltInstructions;
WHV_PROCESSOR_INTERCEPT_COUNTER CpuidInstructions;
WHV_PROCESSOR_INTERCEPT_COUNTER MsrAccesses;
WHV_PROCESSOR_INTERCEPT_COUNTER OtherIntercepts;
WHV_PROCESSOR_INTERCEPT_COUNTER PendingInterrupts;
WHV_PROCESSOR_INTERCEPT_COUNTER EmulatedInstructions;
WHV_PROCESSOR_INTERCEPT_COUNTER DebugRegisterAccesses;
WHV_PROCESSOR_INTERCEPT_COUNTER PageFaultIntercepts;
} WHV_PROCESSOR_ACTIVITY_COUNTERS;
typedef struct WHV_PROCESSOR_EVENT_COUNTERS
{
UINT64 PageFaultCount;
UINT64 ExceptionCount;
UINT64 InterruptCount;
} WHV_PROCESSOR_GUEST_EVENT_COUNTERS;
typedef struct WHV_PROCESSOR_APIC_COUNTERS
{
UINT64 MmioAccessCount;
UINT64 EoiAccessCount;
UINT64 TprAccessCount;
UINT64 SentIpiCount;
UINT64 SelfIpiCount;
} WHV_PROCESSOR_APIC_COUNTERS;
Parameters
Partition
Especifica a partição a consultar.
VpIndex
Especifica o índice do processador virtual do processador a consultar.
CounterSet
Especifica o conjunto de contadores a consultar.
Buffer
Especifica o buffer onde deve escrever os contadores.
BufferSizeInBytes
Especifica Buffero tamanho de 's em bytes.
BytesWritten
Se não for NULL, recebe o tamanho do contador em bytes.
Valor de retorno
Se a função tiver sucesso, o valor de retorno é S_OK.
Se um valor não reconhecido foi passado para CounterSet, o valor de retorno é WHV_E_UNKNOWN_PROPERTY.
Remarks
A WHvGetVirtualProcessorCounters função recupera o conjunto solicitado de contadores de desempenho para o processador virtual especificado no buffer fornecido.
Requirements
| Requirement | Value |
|---|---|
| Windows mínimo suportado | Windows 10, versão 1809 (x64); Windows 11, versão 24H2, build 26100.3915 (Arm64) |
| Header | WinHvPlatform.h |
| Biblioteca | WinHvPlatform.lib |
| DLL | WinHvPlatform.dll |
| Arquitetura | x64, ARM64 |