File syn_profiler.c¶
FileList > debug > syn_profiler.c
Go to the source code of this file
Task profiler implementation.
#include "../util/syn_assert.h"#include "../util/syn_fmt.h"#include "syn_profiler.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_profiler_dump (const SYN_Profiler * prof, SYN_ProfilerPrintFunc print) Dump profiler results via print callback. |
| void | syn_profiler_enable (SYN_Profiler * prof, bool enable) Enable/disable profiling. |
| void | syn_profiler_init (SYN_Profiler * prof, SYN_ProfileEntry * entries, uint8_t capacity) Initialize the profiler. |
| void | syn_profiler_register (SYN_Profiler * prof, uint8_t index, const char * name) Register a task for profiling. |
| void | syn_profiler_task_begin (SYN_Profiler * prof, uint8_t index) Mark the start of a task's execution. |
| void | syn_profiler_task_end (SYN_Profiler * prof, uint8_t index) Mark the end of a task's execution. |
| void | syn_profiler_update (SYN_Profiler * prof) Update CPU percentages and reset counters for the next period. |
Public Functions Documentation¶
function syn_profiler_dump¶
Dump profiler results via print callback.
Parameters:
profProfiler.printPrint function.
function syn_profiler_enable¶
Enable/disable profiling.
Parameters:
profProfiler.enabletrue to enable, false to disable.
function syn_profiler_init¶
Initialize the profiler.
Parameters:
profProfiler instance.entriesArray of profile entries (one per task).capacityNumber of entries.
function syn_profiler_register¶
Register a task for profiling.
Parameters:
profProfiler.indexTask index (must match scheduler task index).nameTask name for display.
function syn_profiler_task_begin¶
Mark the start of a task's execution.
Parameters:
profProfiler.indexTask index.
function syn_profiler_task_end¶
Mark the end of a task's execution.
Parameters:
profProfiler.indexTask index.
function syn_profiler_update¶
Update CPU percentages and reset counters for the next period.
Call periodically (e.g., every 1 second).
Parameters:
profProfiler.
The documentation for this class was generated from the following file src/syntropic/debug/syn_profiler.c