结构体 | |
struct | OsIrqCpupCB |
struct | tagCpupInfo |
类型定义 | |
typedef struct tagCpupInfo | CPUP_INFO_S |
枚举 | |
enum | { CPUP_LAST_TEN_SECONDS = 0 , CPUP_LAST_ONE_SECONDS = 1 , CPUP_ALL_TIME = 0xffff } |
函数 | |
UINT32 | LOS_HistorySysCpuUsage (UINT16 mode) |
Obtain the historical CPU usage. 更多... | |
UINT32 | LOS_HistoryProcessCpuUsage (UINT32 pid, UINT16 mode) |
Obtain the historical CPU usage of a specified process. 更多... | |
UINT32 | LOS_HistoryTaskCpuUsage (UINT32 tid, UINT16 mode) |
Obtain the historical CPU usage of a specified task. 更多... | |
UINT32 | LOS_GetAllProcessCpuUsage (UINT16 mode, CPUP_INFO_S *cpupInfo, UINT32 len) |
Obtain the CPU usage of processes. 更多... | |
UINT32 | LOS_GetAllIrqCpuUsage (UINT16 mode, CPUP_INFO_S *cpupInfo, UINT32 len) |
Obtain the CPU usage of hwi. 更多... | |
VOID | LOS_CpupReset (VOID) |
Reset the data of CPU usage. 更多... | |
typedef struct tagCpupInfo CPUP_INFO_S |
Count the CPU usage structures of all cpup.
anonymous enum |
Query the CPU usage of the system.
枚举值 | |
---|---|
CPUP_LAST_TEN_SECONDS | Display CPU usage in the last ten seconds. |
CPUP_LAST_ONE_SECONDS | Display CPU usage in the last one seconds. |
CPUP_ALL_TIME | Display CPU usage from system startup to now. |
在文件 los_cpup.h 第 131 行定义.
VOID LOS_CpupReset | ( | VOID | ) |
Reset the data of CPU usage.
None. |
#None. |
在文件 los_cpup.c 第 281 行定义.
UINT32 LOS_GetAllIrqCpuUsage | ( | UINT16 | mode, |
CPUP_INFO_S * | cpupInfo, | ||
UINT32 | len | ||
) |
Obtain the CPU usage of hwi.
mode | [IN] UINT16. Time mode. The parameter value 0 indicates that the CPU usage within 10s will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.Other values indicate that the CPU usage in all time will be obtained. |
cpupInfo | [OUT]Type. CPUP_INFO_S* Pointer to the CPUP information structure to be obtained. |
len | [IN] UINT32. The Maximum length of hwis. |
#LOS_ERRNO_CPUP_NO_INIT | The CPU usage is not initialized. |
#LOS_ERRNO_CPUP_PROCESS_PTR_ERR | The input parameter pointer is NULL or len less than LOS_GetSystemHwiMaximum() * sizeof (CPUP_INFO_S). |
#LOS_OK | The CPU usage of all hwis is successfully obtained. |
Obtain the CPU usage of hwi.
mode | |
cpupInfo | |
len |
在文件 los_cpup.c 第 715 行定义.
UINT32 LOS_GetAllProcessCpuUsage | ( | UINT16 | mode, |
CPUP_INFO_S * | cpupInfo, | ||
UINT32 | len | ||
) |
Obtain the CPU usage of processes.
mode | [IN] UINT16. Time mode. The parameter value 0 indicates that the CPU usage within 10s will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained.Other values indicate that the CPU usage in all time will be obtained. |
cpupInfo | [OUT]Type. CPUP_INFO_S* Pointer to the CPUP information structure to be obtained. |
len | [IN] UINT32. The Maximum length of processes. |
#LOS_ERRNO_CPUP_NO_INIT | The CPU usage is not initialized. |
#LOS_ERRNO_CPUP_PROCESS_PTR_ERR | The input parameter pointer is NULL or len less than LOS_GetSystemProcessMaximum() * sizeof (CPUP_INFO_S). |
#LOS_OK | The CPU usage of all processes is successfully obtained. |
Obtain the CPU usage of processes.
在文件 los_cpup.c 第 584 行定义.
Obtain the historical CPU usage of a specified process.
pid | [IN] UINT32. process ID. |
mode | [IN] UINT16. cpup mode. The parameter value 0 indicates that the CPU usage within 10s will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained. Other values indicate that the CPU usage in the period that is less than 1s will be obtained. |
#LOS_ERRNO_CPUP_NO_INIT | The CPU usage is not initialized. |
#LOS_ERRNO_CPUP_ID_INVALID | The target process ID is invalid. |
#LOS_ERRNO_CPUP_NO_CREATED | The target process is not created. |
UINT32 | [0, LOS_CPUP_PRECISION], CPU usage of the specified process. |
Obtain the historical CPU usage of a specified process.
pid | |
mode |
在文件 los_cpup.c 第 485 行定义.
Obtain the historical CPU usage.
mode | [IN] UINT16. process mode. The parameter value 0 indicates that the CPU usage within 10s will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained. Other values indicate that the CPU usage in all time will be obtained. |
#LOS_ERRNO_CPUP_NO_INIT | The CPU usage is not initialized. |
UINT32 | [0, LOS_CPUP_SINGLE_CORE_PRECISION], historical CPU usage, of which the precision is adjustable. |
Obtain the historical CPU usage.
mode |
在文件 los_cpup.c 第 435 行定义.
Obtain the historical CPU usage of a specified task.
tid | [IN] UINT32. task ID. |
mode | [IN] UINT16. cpup mode. The parameter value 0 indicates that the CPU usage within 10s will be obtained, and the parameter value 1 indicates that the CPU usage in the former 1s will be obtained. Other values indicate that the CPU usage in the period that is less than 1s will be obtained. |
#LOS_ERRNO_CPUP_NO_INIT | The CPU usage is not initialized. |
#LOS_ERRNO_CPUP_ID_INVALID | The target task ID is invalid. |
#LOS_ERRNO_CPUP_NO_CREATED | The target task is not created. |
UINT32 | [0, LOS_CPUP_SINGLE_CORE_PRECISION], CPU usage of the specified process. |
Obtain the historical CPU usage of a specified task.
tid | |
mode |
在文件 los_cpup.c 第 530 行定义.