oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
profiler.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
27#ifndef OVE_PROFILER_H
28#define OVE_PROFILER_H
29
30#include <stddef.h>
31#include <stdint.h>
32
33#include "ove_config.h"
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#ifdef CONFIG_OVE_PROFILER
40
52
61
68
80
89
107size_t ove_backend_profiler_drain_symbols(char *out, size_t out_max);
108
109#else
110
111static inline int ove_backend_profiler_start(void)
112{
113 return 0;
114}
115static inline void ove_backend_profiler_sample_tick(void)
116{
117}
118static inline void ove_backend_profiler_stop(void)
119{
120}
121static inline void ove_backend_profiler_set_rate(uint32_t hz)
122{
123 (void)hz;
124}
125static inline uint32_t ove_backend_profiler_get_max_hz(void)
126{
127 return 0;
128}
129static inline size_t ove_backend_profiler_drain_symbols(char *out, size_t out_max)
130{
131 (void)out;
132 (void)out_max;
133 return 0;
134}
135
136#endif /* CONFIG_OVE_PROFILER */
137
138#ifdef __cplusplus
139}
140#endif
141
142#endif /* OVE_PROFILER_H */
int ove_backend_profiler_start(void)
Arm the backend sampling mechanism (install signal handler on POSIX, etc.).
void ove_backend_profiler_sample_tick(void)
Drive one sampler tick.
void ove_backend_profiler_set_rate(uint32_t hz)
Set the desired sampling rate in Hz.
size_t ove_backend_profiler_drain_symbols(char *out, size_t out_max)
Drain newly-interned symbol entries as a JSON array.
void ove_backend_profiler_stop(void)
Disarm the backend sampling mechanism.
uint32_t ove_backend_profiler_get_max_hz(void)
Report the compile-time max sampling rate.