THREAD_PERFORMANCE_DATA - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTPSAPI_H

/**
 * The THREAD_PERFORMANCE_DATA structure aggregates various performance metrics for a thread.
 * 
 * \remarks https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-performance_data
 */
typedef struct _THREAD_PERFORMANCE_DATA
{
    // The size of the structure.
    USHORT Size;
    // The version of the structure. Must be set to PERFORMANCE_DATA_VERSION.
    USHORT Version;
    // The processor number that identifies where the thread is running.
    PROCESSOR_NUMBER ProcessorNumber;
    // The number of context switches that occurred from the time profiling was enabled.
    ULONG ContextSwitches;
    // The number of array elements in the HwCounters array that contain hardware counter data.
    ULONG HwCountersCount;
    // The number of times that the read operation read the data to ensure a consistent snapshot of the data.
    ULONG64 UpdateCount;
    // A bitmask of KWAIT_REASON that identifies the reasons for the context switches that occurred since the last time the data was read.
    ULONG64 WaitReasonBitMap;
    // A bitmask of hardware counters used to collect counter data.
    ULONG64 HardwareCounters;
    // The cycle time of the thread (excludes the time spent interrupted) from the time profiling was enabled.
    COUNTER_READING CycleTime;
    // The COUNTER_READING structure that contains hardware counter data.
    COUNTER_READING HwCounters[MAX_HW_COUNTERS];
} THREAD_PERFORMANCE_DATA, *PTHREAD_PERFORMANCE_DATA;

#endif

View code on GitHub

No description available.