Skip to content
fn

current_profiler

→Profiler*
Profiler * current_profiler()

Returns the Profiler currently registered for the calling thread.

Returns

Profiler*

Non-owning pointer to the active profiler, or nullptr if no profiler is registered on this thread.

Notes

The pointer is stored in thread_local storage, so each thread sees its own value independently. Ownership of the pointed-to Profiler remains with the caller.