RtQuerySystemPerfCaps

RtQuerySystemPerfCaps queries the performance capability of each logical processor for the specified ClassID.

Syntax

Copy
BOOL RtQuerySystemPerfCaps(
    [in]    ULONG    ClassID,
    [out]   ULONG    SystemPerfCaps[]
);

Parameters

[in] ClassID

Specifies the Class ID of the performance capabilities to be queried. Class ID (0, 1, 2, …) represents a software thread’s characteristic, i.e., the instruction set the thread executes on the logical processor.

[out] SystemPerfCaps[]

A ULONG array to store current performance capabilities of Class ID on each active logical processor.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Possible error codes:

Error

Description

ERROR_INVALID_PARAMETER

One of the function parameters is not valid.

ERROR_NOT_SUPPORTED

Intel Thread Director is not supported

Remarks

Thread Class IDs (0, 1, 2, …) represent a software thread's characteristics, i.e., the assembly instruction set (e.g., AVX2) the thread executes. With Intel Thread Director Technology (IDT), the logical processor feedbacks the Class ID of the thread running on it once it has collected sufficient history.

eRTOS does not dynamically migrate threads during thread scheduling. It is recommended that processes call RtQuerySystemPerfCaps for each ClassID to identify the performance ideal processor/processors. Since SetThreadIdealProcessor or SetThreadAffinityMask cannot migrate Interrupt Service Thread (IST), Timer Service Thread (TST), and threads using NPX at run-time, you may need to affine those threads to their performance ideal processors at thread creation time if you know the instruction set those threads use.

On performance hybrid architectures, there are performance cores (P-Core) and efficiency cores (E-Core). The ProcessorHybridInfo utility displays each core type, performance capability, and thread class ID for different sets of assembly instructions. The Class IDs for instruction sets are as follows:

Instruction set Class ID

Default

0

Integer Registers

1

AVX/AVX2

2

Pause

3

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RtssApi.h rtkrnl.lib

See Also: