Base Framework
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Profiler::ProfilerImpl Class Reference

Classes

class  Block
 
class  SymbolAndParent
 

Public Member Functions

bool open (const String &path)
 
void addEvent (const Profiler::Event &e)
 
const StackFramegetStackFrame (uint32 sf) const noexcept
 
uint32 getStackFrame (const ConstSpan< const void * > &stackTrace)
 
unsigned int buildStackFrame (const uint32 sf)
 
void close ()
 
void releaseEvents ()
 
void release ()
 

Public Attributes

Blockblocks = nullptr
 
const MemorySize pid = Process::getProcess().getId()
 
Array< StackFramestackFramesHash
 
Array< StackFramestackFramesUnhash
 
String stackPattern
 
Array< FramestackFrames
 
Map< SymbolAndParent, unsigned int > stackFramesBySymbol
 
MemorySize rebalanceCount = 0
 
Map< uint32, unsigned int > stackFramesLookup
 
PreferredAtomicCounter numberOfEvents
 
FileOutputStream fos
 
bool useStackFrames = false
 
unsigned int minimumWaitTime = 1
 
unsigned int minimumHeapSize = 4096 * 2 / 2
 
unsigned int captureIOSize = 0
 

Static Public Attributes

static constexpr unsigned int MAXIMUM_STACK_TRACE = 64
 
static constexpr uint32 SF_HIGH_BIT = 0x80000000U
 

Member Function Documentation

◆ addEvent()

void Profiler::ProfilerImpl::addEvent ( const Profiler::Event e)

Add new event.

◆ getStackFrame() [1/2]

uint32 Profiler::ProfilerImpl::getStackFrame ( const ConstSpan< const void * > &  stackTrace)

Registers the stack trace.

◆ getStackFrame() [2/2]

const StackFrame& Profiler::ProfilerImpl::getStackFrame ( uint32  sf) const
inlinenoexcept

Returns the stack frame for the given sf.

◆ release()

void Profiler::ProfilerImpl::release ( )

Release.

◆ releaseEvents()

void Profiler::ProfilerImpl::releaseEvents ( )

Release events.

Member Data Documentation

◆ blocks

Block* Profiler::ProfilerImpl::blocks = nullptr

Double linked list of all events.

◆ captureIOSize

unsigned int Profiler::ProfilerImpl::captureIOSize = 0

The global IO capture limit.

◆ minimumHeapSize

unsigned int Profiler::ProfilerImpl::minimumHeapSize = 4096 * 2 / 2

The minimum heap size to record event.

◆ minimumWaitTime

unsigned int Profiler::ProfilerImpl::minimumWaitTime = 1

The minimum time to wait to record event.

◆ useStackFrames

bool Profiler::ProfilerImpl::useStackFrames = false

Include stack frames for events.