Defined in carb/profiler/Profile.h

CARB_PROFILE_BEGIN(maskOrChannel, eventName, ...)

Marks the beginning of a profiling zone.

To end the profiling zone, use CARB_PROFILE_END().


Consider using CARB_PROFILE_ZONE() to automatically profile a scope. Manual begin and end sections can cause programming errors and confuse the profiler if an end is skipped.

  • maskOrChannel – The event mask (see carb::profiler::setCaptureMask()) or a channel symbol name.

  • eventName – The name of the profiling zone. This must be either a literal string or a printf-style format string. Literal strings are far more efficient.

  • ... – Optional printf-style variadic arguments corresponding to format specifiers in eventName.


A carb::profiler::ZoneId that is unique to this zone and should be passed to CARB_PROFILE_END().