File syn_task_profile.c¶
FileList > debug > syn_task_profile.c
Go to the source code of this file
Opt-In Task Execution & CPU Jitter Profiler implementation.
#include "syn_task_profile.h"#include <string.h>
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. |
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.
The documentation for this class was generated from the following file src/syntropic/debug/syn_task_profile.c