Kanzi 4.0.0-beta2
Internals

Internal implementation of the tracing subsystem. More...

Collaboration diagram for Internals:

Classes

class  kanzi::EventScope< TCategory, TString, Enabled >
 Helper class to manage an event scope. More...
 
class  kanzi::EventScope< TCategory, TString, false >
 

Typedefs

using kanzi::TraceTimePoint
 The standard time point for the Tracing subsystem.
 

Functions

void kanzi::addTracingDurationEvent (uint16_t category, const string &name, TraceTimePoint start, TraceTimePoint end) noexcept
 Record a duration event with a dynamic name.
 
void kanzi::addTracingDurationEvent (uint16_t category, FixedString name, TraceTimePoint start, TraceTimePoint end) noexcept
 Record a duration event with a static name.
 
void kanzi::addTracingFrameEvent (TraceTimePoint time) noexcept
 Record a frame event.
 
void kanzi::addTracingInstantEvent (uint16_t category, FixedString name, TraceTimePoint time) noexcept
 Record an instant event with a static name.
 
void kanzi::addTracingSample (uint16_t category, FixedString name, TraceTimePoint time, double data) noexcept
 Record a floating point sample event with a static name.
 
void kanzi::addTracingSample (uint16_t category, FixedString name, TraceTimePoint time, int64_t data) noexcept
 Record an integer sample event with a static name.
 
void kanzi::applyTracingApplicationSettings (const TracingSettings &settings)
 Apply tracing settings.
 
void kanzi::initializeTracing ()
 Initialize the tracing subsystem.
 
void kanzi::setTracingThreadName (string_view name)
 Sets the current thread name within the tracing system.
 

Detailed Description

Internal implementation of the tracing subsystem.

These methods should not be used directly, instead use the Configuration macros and Scope macros that are automatically enabled and disabled in different build configurations.

Typedef Documentation

◆ TraceTimePoint

The standard time point for the Tracing subsystem.

Function Documentation

◆ initializeTracing()

void kanzi::initializeTracing ( )

Initialize the tracing subsystem.

This should be called once at startup.

It is not recommended to call this function directly, call kzTraceInitialize() instead.

◆ setTracingThreadName()

void kanzi::setTracingThreadName ( string_view name)

Sets the current thread name within the tracing system.

It is not recommended to call this function directly, use kzTraceSetThreadName macro instead.

Parameters
nameThe thread name.

◆ applyTracingApplicationSettings()

void kanzi::applyTracingApplicationSettings ( const TracingSettings & settings)

Apply tracing settings.

This should be called once shortly after startup.

It is not recommended to call this function directly, use kzTraceApplySettings macro instead.

Parameters
settingsThe tracing subsystem settings.

◆ addTracingDurationEvent() [1/2]

void kanzi::addTracingDurationEvent ( uint16_t category,
FixedString name,
TraceTimePoint start,
TraceTimePoint end )
noexcept

Record a duration event with a static name.

It is not recommended to call this function directly, use kzTrace macro instead.

Parameters
categoryThe category id.
nameThe static name.
startThe timepoint for the start of the duration event.
endThe timepoint for the end of the duration event.

◆ addTracingDurationEvent() [2/2]

void kanzi::addTracingDurationEvent ( uint16_t category,
const string & name,
TraceTimePoint start,
TraceTimePoint end )
noexcept

Record a duration event with a dynamic name.

It is not recommended to call this function directly, use kzTraceDynamic macro instead.

Parameters
categoryThe category id.
nameThe dynamic name.
startThe timepoint for the start of the duration event.
endThe timepoint for the end of the duration event.

◆ addTracingInstantEvent()

void kanzi::addTracingInstantEvent ( uint16_t category,
FixedString name,
TraceTimePoint time )
noexcept

Record an instant event with a static name.

It is not recommended to call this function directly, use kzTraceInstant macro instead.

Parameters
categoryThe category id.
nameThe static name.
timeThe timepoint for the event.

◆ addTracingFrameEvent()

void kanzi::addTracingFrameEvent ( TraceTimePoint time)
noexcept

Record a frame event.

It is not recommended to call this function directly, use kzTraceAdvanceFrame macro instead.

Parameters
timeThe timepoint for the event.

◆ addTracingSample() [1/2]

void kanzi::addTracingSample ( uint16_t category,
FixedString name,
TraceTimePoint time,
int64_t data )
noexcept

Record an integer sample event with a static name.

It is not recommended to call this function directly, use kzTraceSample macro instead.

Parameters
categoryThe category id.
nameThe static name.
timeThe timepoint for the event.
dataThe event value.

◆ addTracingSample() [2/2]

void kanzi::addTracingSample ( uint16_t category,
FixedString name,
TraceTimePoint time,
double data )
noexcept

Record a floating point sample event with a static name.

It is not recommended to call this function directly, use kzTraceSample macro instead.

Parameters
categoryThe category id.
nameThe static name.
timeThe timepoint for the event.
dataThe event value.