Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Object Core Statistics APIs

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.
 

Detailed Description

Function Documentation

◆ k_obj_core_stats_deregister()

int k_obj_core_stats_deregister ( struct k_obj_core * obj_core)

#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.

Parameters
obj_corePointer to kernel object core
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_disable()

int k_obj_core_stats_disable ( struct k_obj_core * obj_core)

#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.

Parameters
obj_corePointer to kernel object core
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_enable()

int k_obj_core_stats_enable ( struct k_obj_core * obj_core)

#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.

Parameters
obj_corePointer to kernel object core
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_query()

int k_obj_core_stats_query ( struct k_obj_core * obj_core,
void * stats,
size_t stats_len )

#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.

Parameters
obj_corePointer to kernel object core
statsPointer to memory buffer into which to copy the queried stats
stats_lenLength of the memory buffer
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_raw()

int k_obj_core_stats_raw ( struct k_obj_core * obj_core,
void * stats,
size_t stats_len )

#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.

Parameters
obj_corePointer to kernel object core
statsPointer to memory buffer into which to copy raw stats
stats_lenLength of the memory buffer
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_register()

int k_obj_core_stats_register ( struct k_obj_core * obj_core,
void * stats,
size_t stats_len )

#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.

Parameters
obj_corePointer to kernel object core
statsPointer to raw kernel statistics
stats_lenSize of raw kernel statistics buffer
Return values
0on success
-errnoon failure

◆ k_obj_core_stats_reset()

int k_obj_core_stats_reset ( struct k_obj_core * obj_core)

#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.

Parameters
obj_corePointer to kernel object core
Return values
0on success
-errnoon failure