Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
Functions | |
int | k_obj_core_stats_register (struct k_obj_core *obj_core, void *stats, size_t stats_len) |
Register kernel object for gathering statistics. | |
int | k_obj_core_stats_deregister (struct k_obj_core *obj_core) |
Deregister kernel object from gathering statistics. | |
int | k_obj_core_stats_raw (struct k_obj_core *obj_core, void *stats, size_t stats_len) |
Retrieve the raw statistics associated with the kernel object. | |
int | k_obj_core_stats_query (struct k_obj_core *obj_core, void *stats, size_t stats_len) |
Retrieve the statistics associated with the kernel object. | |
int | k_obj_core_stats_reset (struct k_obj_core *obj_core) |
Reset the stats associated with the kernel object. | |
int | k_obj_core_stats_disable (struct k_obj_core *obj_core) |
Stop gathering the stats associated with the kernel object. | |
int | k_obj_core_stats_enable (struct k_obj_core *obj_core) |
Reset the stats associated with the kernel object. | |
int k_obj_core_stats_deregister | ( | struct k_obj_core * | obj_core | ) |
#include <include/zephyr/kernel/obj_core.h>
Deregister kernel object from gathering statistics.
Deregistering a kernel object core from gathering statistics prevents it from gathering any more statistics. It is expected to be invoked at the end of a kernel object's life cycle.
obj_core | Pointer to kernel object core |
0 | on success |
-errno | on failure |
int k_obj_core_stats_disable | ( | struct k_obj_core * | obj_core | ) |
#include <include/zephyr/kernel/obj_core.h>
Stop gathering the stats associated with the kernel object.
This function temporarily stops the gathering of statistics associated with the kernel object core specified by obj_core. The gathering of statistics can be resumed by invoking :c:func :k_obj_core_stats_enable
.
obj_core | Pointer to kernel object core |
0 | on success |
-errno | on failure |
int k_obj_core_stats_enable | ( | struct k_obj_core * | obj_core | ) |
#include <include/zephyr/kernel/obj_core.h>
Reset the stats associated with the kernel object.
This function resumes the gathering of statistics associated with the kernel object core specified by obj_core.
obj_core | Pointer to kernel object core |
0 | on success |
-errno | on failure |
int k_obj_core_stats_query | ( | struct k_obj_core * | obj_core, |
void * | stats, | ||
size_t | stats_len | ||
) |
#include <include/zephyr/kernel/obj_core.h>
Retrieve the statistics associated with the kernel object.
This function copies the statistics associated with the kernel object core specified by obj_core into the buffer stats. Unlike the raw statistics this may report calculated values such as averages. Note that the size of the buffer (stats_len) must match the size specified by the kernel object type's statistics descriptor.
obj_core | Pointer to kernel object core |
stats | Pointer to memory buffer into which to copy the queried stats |
stats_len | Length of the memory buffer |
0 | on success |
-errno | on failure |
int k_obj_core_stats_raw | ( | struct k_obj_core * | obj_core, |
void * | stats, | ||
size_t | stats_len | ||
) |
#include <include/zephyr/kernel/obj_core.h>
Retrieve the raw statistics associated with the kernel object.
This function copies the raw statistics associated with the kernel object core specified by obj_core into the buffer stats. Note that the size of the buffer (stats_len) must match the size specified by the kernel object type's statistics descriptor.
obj_core | Pointer to kernel object core |
stats | Pointer to memory buffer into which to copy raw stats |
stats_len | Length of the memory buffer |
0 | on success |
-errno | on failure |
int k_obj_core_stats_register | ( | struct k_obj_core * | obj_core, |
void * | stats, | ||
size_t | stats_len | ||
) |
#include <include/zephyr/kernel/obj_core.h>
Register kernel object for gathering statistics.
Before a kernel object can gather statistics, it must be registered to do so. Registering will also automatically enable the kernel object to gather its statistics.
obj_core | Pointer to kernel object core |
stats | Pointer to raw kernel statistics |
stats_len | Size of raw kernel statistics buffer |
0 | on success |
-errno | on failure |
int k_obj_core_stats_reset | ( | struct k_obj_core * | obj_core | ) |
#include <include/zephyr/kernel/obj_core.h>
Reset the stats associated with the kernel object.
This function resets the statistics associated with the kernel object core specified by obj_core.
obj_core | Pointer to kernel object core |
0 | on success |
-errno | on failure |