Nebula
Loading...
Searching...
No Matches
profiling.h File Reference
#include "timing/time.h"
#include "timing/timer.h"
#include "util/stack.h"
#include "util/dictionary.h"
#include "util/stringatom.h"
#include "util/tupleutility.h"
#include "threading/thread.h"
#include "threading/criticalsection.h"
#include <atomic>

Go to the source code of this file.

Classes

struct  Profiling::ProfilingScope
 
struct  Profiling::ProfilingScopeLock
 convenience class used to automatically push and pop scopes More...
 
struct  Profiling::ProfilingContext
 thread context of profiling More...
 

Namespaces

namespace  Profiling
 

Macros

#define N_SCOPE(name, cat)
 Profiling interface.
 
#define N_SCOPE_DYN(str, cat)
 
#define N_SCOPE_ACCUM(name, cat)
 
#define N_SCOPE_DYN_ACCUM(name, cat)
 
#define N_MARKER_BEGIN(name, cat)
 
#define N_MARKER_END()
 
#define N_COUNTER_INCR(name, value)
 
#define N_COUNTER_DECR(name, value)
 
#define N_DECLARE_COUNTER(name, label)
 

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.
 

Macro Definition Documentation

◆ N_COUNTER_DECR

#define N_COUNTER_DECR ( name,
value )

◆ N_COUNTER_INCR

#define N_COUNTER_INCR ( name,
value )

◆ N_DECLARE_COUNTER

#define N_DECLARE_COUNTER ( name,
label )

◆ N_MARKER_BEGIN

#define N_MARKER_BEGIN ( name,
cat )

◆ N_MARKER_END

#define N_MARKER_END ( )

◆ N_SCOPE

#define N_SCOPE ( name,
cat )

Profiling interface.

◆ N_SCOPE_ACCUM

#define N_SCOPE_ACCUM ( name,
cat )

◆ N_SCOPE_DYN

#define N_SCOPE_DYN ( str,
cat )

◆ N_SCOPE_DYN_ACCUM

#define N_SCOPE_DYN_ACCUM ( name,
cat )