CARB_PROFILE_REGISTER_STRING

Defined in carb/profiler/Profile.h

CARB_PROFILE_REGISTER_STRING(str)

Registers a static string for use with the profiler.

The profiler works by capturing events very quickly in the thread of execution that they happen in, and then processing them later in a background thread. Since static/literal strings are contained in memory that may be invalid once the module unloads, these static/literal strings are registered and copied by the profiler and this macro returns a handle to the string that can be passed to the “static” function such as carb::profiler::IProfiler::beginStatic().

Note

This macro is used by other helper macros and is typically not used by applications.

Warning

Undefined behavior occurs if the given string is not a literal or static string.

Returns

A handle to the static string registered with the profiler. There is no need to unregister this string.