File syn_task_profile.h¶
FileList > debug > syn_task_profile.h
Go to the source code of this file
Opt-In Task Execution & CPU Jitter Profiler. More...
#include "../common/syn_defs.h"#include "../sched/syn_sched.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_TaskProfile Task Execution Profile Metrics Structure. |
| struct | SYN_TaskProfileManager Task Profiler Registry / Manager Instance. |
Public Functions¶
| Type | Name |
|---|---|
| void | syn_task_profile_enable (SYN_TaskProfileManager * mgr, bool enable) Enable or disable the task profiler. |
| SYN_Status | syn_task_profile_get (const SYN_TaskProfileManager * mgr, size_t task_idx, SYN_TaskProfile * profile) Get the profile statistics for a specific task. |
| SYN_Status | syn_task_profile_init (SYN_TaskProfileManager * mgr) Initialize the task execution profiler. |
| void | syn_task_profile_step_end (SYN_TaskProfileManager * mgr, size_t task_idx, uint32_t now_us) Record the completion / yield of a task step execution. |
| void | syn_task_profile_step_start (SYN_TaskProfileManager * mgr, size_t task_idx, const char * task_name, uint32_t now_us) Record the start of a task step execution. |
| void | syn_task_profile_update (SYN_TaskProfileManager * mgr, uint32_t now_us) Recalculate CPU utilization percentages across active tasks. |
Macros¶
| Type | Name |
|---|---|
| define | SYN_TASK_PROFILE_MAX_TASKS 16 |
Detailed Description¶
Provides opt-in execution duration, maximum yield latency, and CPU % utilization tracking for cooperative protothread tasks.
Public Functions Documentation¶
function syn_task_profile_enable¶
Enable or disable the task profiler.
Parameters:
mgrPointer to profile manager.enabletrue to enable, false to disable.
function syn_task_profile_get¶
Get the profile statistics for a specific task.
SYN_Status syn_task_profile_get (
const SYN_TaskProfileManager * mgr,
size_t task_idx,
SYN_TaskProfile * profile
)
Parameters:
mgrPointer to profile manager.task_idxTask index.profileOutput profile metrics pointer.
Returns:
SYN_OK on success, or SYN_INVALID_PARAM.
function syn_task_profile_init¶
Initialize the task execution profiler.
Parameters:
mgrPointer to task profile manager.
Returns:
SYN_OK on success.
function syn_task_profile_step_end¶
Record the completion / yield of a task step execution.
Parameters:
mgrPointer to profile manager.task_idxIndex of executing task.now_usCurrent microsecond timestamp.
function syn_task_profile_step_start¶
Record the start of a task step execution.
void syn_task_profile_step_start (
SYN_TaskProfileManager * mgr,
size_t task_idx,
const char * task_name,
uint32_t now_us
)
Parameters:
mgrPointer to profile manager.task_idxIndex of executing task.task_nameTask identifier name.now_usCurrent microsecond timestamp.
function syn_task_profile_update¶
Recalculate CPU utilization percentages across active tasks.
Parameters:
mgrPointer to profile manager.now_usCurrent microsecond timestamp.
Macro Definition Documentation¶
define SYN_TASK_PROFILE_MAX_TASKS¶
The documentation for this class was generated from the following file src/syntropic/debug/syn_task_profile.h