|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Profiling: the cycle counter, the audio budget, section profiles and reports. More...
Profiling: the cycle counter, the audio budget, section profiles and reports.
Classes | |
| class | AudioBudget |
| Cycle budget of the audio callback: load, peak, minimum, overruns and a load histogram. More... | |
| class | Counter |
| struct | CycleScope |
| struct | Entry |
| struct | Registry |
| The header and the table. More... | |
| class | SectionProfile |
| class | TaggedReporter |
Enumerations | |
| enum class | Kind : uint8_t { None = 0 , Budget = 1 , Section = 2 , Counter = 3 } |
Functions | |
| void | init () |
| void | init_for_profiling () |
| uint32_t | cycles () |
| constexpr uint32_t | cycle_rate () |
| int | format_tagged_histogram (char *buf, size_t size, const AudioBudget &budget) |
| Format CPU load histogram as a tagged output line. | |
Variables | |
| constexpr uint32_t | REGISTRY_MAGIC = 0x464F5250u |
| constexpr uint32_t | REGISTRY_VERSION = 1 |
| constexpr size_t | REGISTRY_CAPACITY = SBL_PROFILING_REGISTRY_CAPACITY |
| constexpr size_t | NAME_SIZE = 12 |
| constexpr uint32_t | NO_MINIMUM = 0xFFFFFFFFu |
| constexpr uint32_t | REGISTRY_HEADER_SIZE = 40 |
| constexpr uint32_t | REGISTRY_ENTRY_SIZE = 64 |
|
strong |
What an entry measures: the value of its kind field.
Definition at line 57 of file registry.hpp.
|
inline |
Start the counter. Call once at startup, after clock configuration.
Definition at line 26 of file cycles.hpp.
Referenced by init_for_profiling().
|
inline |
init() in a build with SBL_PROFILING and nothing otherwise, for an app whose measurements are all gated by it.
Definition at line 32 of file cycles.hpp.
References init().
|
inline |
The current count (free-running, wraps at 2^32).
Definition at line 39 of file cycles.hpp.
Referenced by sbl::system::profiling::Entry::measure(), sbl::system::profiling::AudioBudget::on_block_end(), and sbl::system::profiling::AudioBudget::on_block_start().
|
inlineconstexpr |
Counts per second.
Definition at line 42 of file cycles.hpp.
Referenced by sbl::system::profiling::AudioBudget::init().
|
inline |
Format CPU load histogram as a tagged output line.
Emits a single #HIST line with 11 bucket counts (10% each, last is >100%).
Definition at line 218 of file report.hpp.
References sbl::log::format(), sbl::system::profiling::AudioBudget::hist_bucket(), and sbl::system::profiling::AudioBudget::hist_size().
|
inlineconstexpr |
the bytes "PROF", little-endian
Definition at line 48 of file registry.hpp.
|
inlineconstexpr |
layout version this header writes
Definition at line 49 of file registry.hpp.
|
inlineconstexpr |
entries the table holds
Definition at line 50 of file registry.hpp.
|
inlineconstexpr |
an entry's name field, terminator included
Definition at line 51 of file registry.hpp.
|
inlineconstexpr |
min before the window's first measurement
Definition at line 52 of file registry.hpp.
Referenced by sbl::system::profiling::Entry::close_window(), and sbl::system::profiling::Entry::open_window().
|
inlineconstexpr |
bytes from the symbol to the first entry
Definition at line 229 of file registry.hpp.
|
inlineconstexpr |
bytes an entry takes
Definition at line 230 of file registry.hpp.