Nebula
Loading...
Searching...
No Matches
profiling.cc File Reference

Namespaces

namespace  Profiling
 

Functions

void Profiling::ProfilingPushScope (const ProfilingScope &scope)
 push scope to scope stack
 
void Profiling::ProfilingPopScope ()
 pop scope from scope stack
 
void Profiling::ProfilingNewFrame ()
 pushes an 'end of frame' marker, only available on the main thread
 
Timing::Time Profiling::ProfilingGetTime ()
 get current frametime
 
void Profiling::ProfilingRegisterThread ()
 register a new thread for the profiling
 
const Util::Array< ProfilingScope > & Profiling::ProfilingGetScopes (Threading::ThreadId thread)
 get all top level scopes based on thread, only run when you know the thread is finished
 
const Util::Array< ProfilingContextProfiling::ProfilingGetContexts ()
 get all profiling contexts
 
void Profiling::ProfilingClear ()
 clear all scopes
 
void Profiling::ProfilingIncreaseCounter (const char *id, uint64 value)
 increment profiling counter
 
void Profiling::ProfilingDecreaseCounter (const char *id, uint64 value)
 decrement profiling counter
 
const Util::Dictionary< const char *, uint64 > & Profiling::ProfilingGetCounters ()
 return table of counters
 
void Profiling::ProfilingSetupBudgetCounter (const char *id, uint64 budget)
 Setup a profiling budget counter.
 
void Profiling::ProfilingBudgetIncreaseCounter (const char *id, uint64 value)
 Increment budget counter.
 
void Profiling::ProfilingBudgetDecreaseCounter (const char *id, uint64 value)
 Decrement budget counter.
 
void Profiling::ProfilingBudgetResetCounter (const char *id)
 Reset budget counter.
 
const Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > & Profiling::ProfilingGetBudgetCounters ()
 Return set of budget counters.
 

Variables

Util::Array< ProfilingContextProfiling::profilingContexts
 
Util::Array< Threading::CriticalSection * > Profiling::contextMutexes
 
Util::Dictionary< Util::StringAtom, Util::Array< ProfilingScope > > Profiling::scopesByCategory
 
Threading::CriticalSection Profiling::categoryLock
 
Threading::AtomicCounter Profiling::ProfilingContextCounter = 0
 atomic counter used to give each thread a unique id
 
thread_local IndexT Profiling::ProfilingContextIndex = InvalidIndex
 
Threading::CriticalSection Profiling::counterLock
 
Util::Dictionary< const char *, uint64Profiling::counters
 
Util::Dictionary< const char *, Util::Pair< uint64, uint64 > > Profiling::budgetCounters