WHvGetPartitionCounters

Recupera i contatori delle prestazioni a livello di partizione per una partizione.

Sintassi

typedef enum WHV_PARTITION_COUNTER_SET
{
    WHvPartitionCounterSetMemory,
} WHV_PARTITION_COUNTER_SET;

typedef struct WHV_PARTITION_MEMORY_COUNTERS
{
    UINT64 Mapped4KPageCount;
    UINT64 Mapped2MPageCount;
    UINT64 Mapped1GPageCount;
} WHV_PARTITION_MEMORY_COUNTERS;

HRESULT
WINAPI
WHvGetPartitionCounters(
    _In_ WHV_PARTITION_HANDLE Partition,
    _In_ WHV_PARTITION_COUNTER_SET CounterSet,
    _Out_writes_bytes_to_(BufferSizeInBytes, *BytesWritten) VOID* Buffer,
    _In_ UINT32 BufferSizeInBytes,
    _Out_opt_ UINT32* BytesWritten
    );

Parametri

Partition

Specifica la partizione su cui eseguire la query.

CounterSet

Specifica il contatore impostato per la query.

Buffer

Specifica il buffer in cui scrivere i contatori.

BufferSizeInBytes

Specifica le dimensioni Bufferin byte.

BytesWritten

Se non NULL, specifica un puntatore che verrà aggiornato con le dimensioni del contatore impostato in byte.

Valore restituito

Se la funzione ha esito positivo, il valore restituito è S_OK.

Se per CounterSetè stato passato un valore non riconosciuto , il valore restituito è WHV_E_UNKNOWN_PROPERTY.

Remarks

La WHvGetPartitionCounters funzione recupera il set richiesto di contatori delle prestazioni a livello di partizione nel buffer fornito.

Requisiti

Requisito Valore
Minimo Windows supportato Windows 10 versione 1809 (x64); Windows 11, versione 24H2, build 26100.3915 (Arm64)
Header WinHvPlatform.h
Libreria WinHvPlatform.lib
DLL WinHvPlatform.dll
Architecture x64, Arm64

Vedere anche