24#ifndef SBL_SYSTEM_PROFILING_COUNTER_HPP_
25#define SBL_SYSTEM_PROFILING_COUNTER_HPP_
32#ifdef SBL_PROFILING_ENABLED
37 [[nodiscard]]
bool register_as(
const char* name) {
return slot_.enroll(Kind::Counter, name); }
40 void add(uint32_t events = 1) { slot_.stats().count += events; }
43 void set(uint32_t total) { slot_.stats().count = total; }
46 uint32_t count()
const {
return slot_.stats().count; }
49 void reset() { slot_.stats().clear(); }
59 [[nodiscard]]
static bool register_as(
const char*) {
return true; }
60 static void add(uint32_t = 1) {}
61 static void set(uint32_t) {}
62 static uint32_t count() {
return 0; }
63 static void reset() {}
Profiling: the cycle counter, the audio budget, section profiles and reports.
The profiling registry: every budget, section and counter in one table.