|
Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
Module for monitoring CPU Load More...
Functions | |
| void | cpu_load_on_enter_idle (void) |
| Hook called by the application specific hook on entering CPU idle. | |
| void | cpu_load_on_exit_idle (void) |
| Hook called by the application specific hook on exiting CPU idle. | |
| int | cpu_load_get (bool reset) |
| Get CPU load. | |
| void | cpu_load_log_control (bool enable) |
| Control periodic CPU statistics report. | |
Module for monitoring CPU Load
This module allow monitoring of the CPU load.
| int cpu_load_get | ( | bool | reset | ) |
#include <zephyr/debug/cpu_load.h>
Get CPU load.
CPU load is measured using a timer which tracks amount of time spent in the CPU idle. Since it is a software tracking there is some small overhead. Precision depends on the frequency of the timer in relation to the CPU frequency.
| reset | Reset the measurement after reading. |
| Positive | number - CPU load in per mille. |
| Negative | number - error code. |
| void cpu_load_log_control | ( | bool | enable | ) |
#include <zephyr/debug/cpu_load.h>
Control periodic CPU statistics report.
Report logging is by default enabled.
| enable | true to enable report logging and false to disable. |
| void cpu_load_on_enter_idle | ( | void | ) |
#include <zephyr/debug/cpu_load.h>
Hook called by the application specific hook on entering CPU idle.
| void cpu_load_on_exit_idle | ( | void | ) |
#include <zephyr/debug/cpu_load.h>
Hook called by the application specific hook on exiting CPU idle.