Skip to content

performance_monitor.h

Generated from performance_monitor.h in platform-idf. Edit the header’s doxygen comments to change this page.

Performance monitoring utilities for CrossPad.

void perf_print_task_stats(void)

Print FreeRTOS task runtime statistics.

Shows CPU usage percentage for each task. Requires:

  • CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
  • CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y

Declared in performance_monitor.h:37.

void perf_print_task_list(void)

Print FreeRTOS task list.

Shows task names, states, priorities, and stack usage. Requires CONFIG_FREERTOS_USE_TRACE_FACILITY=y

Declared in performance_monitor.h:45.

void perf_print_stack_usage(void)

Print stack high water marks for all tasks.

Shows remaining stack space (in bytes) for each task. Useful for identifying oversized stacks.

Declared in performance_monitor.h:53.

void perf_print_heap_stats(void)

Print heap statistics.

Shows free heap, largest free block, minimum free ever, for both internal RAM and SPIRAM (if available).

Declared in performance_monitor.h:61.

void perf_print_all_stats(void)

Print comprehensive performance report.

Combines all statistics into a single formatted report.

Declared in performance_monitor.h:68.

bool perf_start_monitor(perf_monitor_config_t *config)

Start periodic performance monitoring task.

Creates a low-priority FreeRTOS task that periodically prints performance statistics to the console.

Note: The task runs at priority 1 (very low) to minimize impact

Parameters

  • config — Monitoring configuration (NULL for defaults)

Returns

Task handle, or NULL on failure

Declared in performance_monitor.h:81.

Configuration for periodic performance monitoring.

FieldTypeDescription
interval_msuint32_tMonitoring interval in milliseconds.
print_task_statsboolEnable task runtime statistics.
print_stack_usageboolEnable stack high water mark reporting.
print_heap_statsboolEnable heap statistics.

Declared in performance_monitor.h:23.