TexGen
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Shiny::ProfileManager Struct Reference

#include <ShinyManager.h>

Public Types

enum  TABLE_SIZE { TABLE_SIZE_INIT = 256 }
 

Public Member Functions

SHINY_INLINE void _appendTicksToCurNode (void)
 
ProfileNode_lookupNode (ProfileNodeCache *a_cache, ProfileZone *a_zone)
 
void _createNodeTable (uint32_t a_count)
 
void _resizeNodeTable (uint32_t a_count)
 
void _createNodePool (uint32_t a_count)
 
void _resizeNodePool (uint32_t a_count)
 
ProfileNode_createNode (ProfileNodeCache *a_cache, ProfileZone *a_pZone)
 
void _insertNode (ProfileNode *a_pNode)
 
void _init (void)
 
void _uninit (void)
 
SHINY_INLINE void _incLookup (void)
 
SHINY_INLINE void _incLookupSuccess (void)
 
SHINY_INLINE float lookupSuccessRate (void) const
 
void _resetZones (void)
 
void _destroyNodes (void)
 
SHINY_INLINE float tableUsage (void) const
 
uint32_t staticMemInBytes (void)
 
uint32_t allocMemInBytes (void)
 
SHINY_INLINE void _beginNode (ProfileNodeCache *a_cache, ProfileZone *a_zone)
 
SHINY_INLINE void _beginNode (ProfileNode *a_node)
 
SHINY_INLINE void _endCurNode (void)
 
void preLoad (void)
 
void updateClean (void)
 
void update (float a_damping=0.9f)
 
void clear (void)
 
void destroy (void)
 
bool output (const char *a_filename)
 
bool output (std::ostream &a_ostream=std::cout)
 
SHINY_INLINE std::string outputNodesAsString (void)
 
SHINY_INLINE std::string outputZonesAsString (void)
 

Static Public Member Functions

static void enumerateNodes (void(*a_func)(const ProfileNode *), const ProfileNode *a_node=&instance.rootNode)
 
template<class T >
static void enumerateNodes (T *a_this, void(T::*a_func)(const ProfileNode *), const ProfileNode *a_node=&instance.rootNode)
 
static void enumerateZones (void(*a_func)(const ProfileZone *), const ProfileZone *a_zone=&instance.rootZone)
 
template<class T >
static void enumerateZones (T *a_this, void(T::*a_func)(const ProfileZone *), const ProfileZone *a_zone=&instance.rootZone)
 

Public Attributes

tick_t _lastTick
 
ProfileNode_curNode
 
uint32_t _tableMask
 
ProfileNodeTable_nodeTable
 
uint64_t _lookupCount
 
uint64_t _lookupSuccessCount
 
uint32_t _tableSize
 
uint32_t nodeCount
 
uint32_t zoneCount
 
ProfileZone_lastZone
 
ProfileNodePool_lastNodePool
 
ProfileNodePool_firstNodePool
 
ProfileNode rootNode
 
ProfileZone rootZone
 
bool _initialized
 
bool _firstUpdate
 

Static Public Attributes

static ProfileNode_dummyNodeTable []
 
static ProfileManager instance
 

Detailed Description

Definition at line 42 of file ShinyManager.h.

Member Enumeration Documentation

◆ TABLE_SIZE

Enumerator
TABLE_SIZE_INIT 

Definition at line 46 of file ShinyManager.h.

Member Function Documentation

◆ _appendTicksToCurNode()

SHINY_INLINE void Shiny::ProfileManager::_appendTicksToCurNode ( void  )
inline

Definition at line 85 of file ShinyManager.h.

References _curNode, _lastTick, Shiny::ProfileNode::appendTicks(), and Shiny::GetTicks().

Referenced by _beginNode(), and _endCurNode().

◆ _beginNode() [1/2]

SHINY_INLINE void Shiny::ProfileManager::_beginNode ( ProfileNode a_node)
inline

◆ _beginNode() [2/2]

SHINY_INLINE void Shiny::ProfileManager::_beginNode ( ProfileNodeCache a_cache,
ProfileZone a_zone 
)
inline

Definition at line 147 of file ShinyManager.h.

References _beginNode(), _curNode, _lookupNode(), and Shiny::ProfileNode::parent.

Referenced by _beginNode().

◆ _createNode()

ProfileNode * Shiny::ProfileManager::_createNode ( ProfileNodeCache a_cache,
ProfileZone a_pZone 
)

◆ _createNodePool()

void Shiny::ProfileManager::_createNodePool ( uint32_t  a_count)

◆ _createNodeTable()

void Shiny::ProfileManager::_createNodeTable ( uint32_t  a_count)

◆ _destroyNodes()

void Shiny::ProfileManager::_destroyNodes ( void  )

◆ _endCurNode()

SHINY_INLINE void Shiny::ProfileManager::_endCurNode ( void  )
inline

◆ _incLookup()

SHINY_INLINE void Shiny::ProfileManager::_incLookup ( void  )
inline

Definition at line 120 of file ShinyManager.h.

References _lookupCount.

◆ _incLookupSuccess()

SHINY_INLINE void Shiny::ProfileManager::_incLookupSuccess ( void  )
inline

Definition at line 121 of file ShinyManager.h.

References _lookupSuccessCount.

◆ _init()

void Shiny::ProfileManager::_init ( void  )
inline

◆ _insertNode()

void Shiny::ProfileManager::_insertNode ( ProfileNode a_pNode)

◆ _lookupNode()

ProfileNode * Shiny::ProfileManager::_lookupNode ( ProfileNodeCache a_cache,
ProfileZone a_zone 
)

Referenced by _beginNode().

◆ _resetZones()

void Shiny::ProfileManager::_resetZones ( void  )

◆ _resizeNodePool()

void Shiny::ProfileManager::_resizeNodePool ( uint32_t  a_count)

◆ _resizeNodeTable()

void Shiny::ProfileManager::_resizeNodeTable ( uint32_t  a_count)

◆ _uninit()

void Shiny::ProfileManager::_uninit ( void  )
inline

◆ allocMemInBytes()

uint32_t Shiny::ProfileManager::allocMemInBytes ( void  )
inline

◆ clear()

void Shiny::ProfileManager::clear ( void  )

◆ destroy()

void Shiny::ProfileManager::destroy ( void  )

◆ enumerateNodes() [1/2]

template<class T >
static void Shiny::ProfileManager::enumerateNodes ( T *  a_this,
void(T::*)(const ProfileNode *)  a_func,
const ProfileNode a_node = &instance.rootNode 
)
inlinestatic

Definition at line 194 of file ShinyManager.h.

References enumerateNodes().

◆ enumerateNodes() [2/2]

static void Shiny::ProfileManager::enumerateNodes ( void(*)(const ProfileNode *)  a_func,
const ProfileNode a_node = &instance.rootNode 
)
inlinestatic

Definition at line 184 of file ShinyManager.h.

References enumerateNodes().

Referenced by enumerateNodes().

◆ enumerateZones() [1/2]

template<class T >
static void Shiny::ProfileManager::enumerateZones ( T *  a_this,
void(T::*)(const ProfileZone *)  a_func,
const ProfileZone a_zone = &instance.rootZone 
)
inlinestatic

Definition at line 212 of file ShinyManager.h.

References enumerateZones().

◆ enumerateZones() [2/2]

static void Shiny::ProfileManager::enumerateZones ( void(*)(const ProfileZone *)  a_func,
const ProfileZone a_zone = &instance.rootZone 
)
inlinestatic

Definition at line 203 of file ShinyManager.h.

References enumerateZones().

Referenced by enumerateZones().

◆ lookupSuccessRate()

SHINY_INLINE float Shiny::ProfileManager::lookupSuccessRate ( void  ) const
inline

Definition at line 122 of file ShinyManager.h.

References _lookupCount, and _lookupSuccessCount.

◆ output() [1/2]

bool Shiny::ProfileManager::output ( const char *  a_filename)

◆ output() [2/2]

bool Shiny::ProfileManager::output ( std::ostream &  a_ostream = std::cout)

◆ outputNodesAsString()

SHINY_INLINE std::string Shiny::ProfileManager::outputNodesAsString ( void  )
inline

Definition at line 179 of file ShinyManager.h.

References nodeCount, Shiny::OutputNodesAsString(), and rootNode.

◆ outputZonesAsString()

SHINY_INLINE std::string Shiny::ProfileManager::outputZonesAsString ( void  )
inline

Definition at line 180 of file ShinyManager.h.

References Shiny::OutputZonesAsString(), rootZone, and zoneCount.

◆ preLoad()

void Shiny::ProfileManager::preLoad ( void  )

◆ staticMemInBytes()

uint32_t Shiny::ProfileManager::staticMemInBytes ( void  )
inline

Definition at line 135 of file ShinyManager.h.

References Shiny::ProfileNode::_dummy, _dummyNodeTable, instance, and zoneCount.

◆ tableUsage()

SHINY_INLINE float Shiny::ProfileManager::tableUsage ( void  ) const
inline

Definition at line 133 of file ShinyManager.h.

References _tableSize, and nodeCount.

◆ update()

void Shiny::ProfileManager::update ( float  a_damping = 0.9f)

◆ updateClean()

void Shiny::ProfileManager::updateClean ( void  )

Member Data Documentation

◆ _curNode

ProfileNode* Shiny::ProfileManager::_curNode

Definition at line 52 of file ShinyManager.h.

Referenced by _appendTicksToCurNode(), _beginNode(), and _endCurNode().

◆ _dummyNodeTable

ProfileNode* Shiny::ProfileManager::_dummyNodeTable[]
static

Definition at line 79 of file ShinyManager.h.

Referenced by staticMemInBytes().

◆ _firstNodePool

ProfileNodePool* Shiny::ProfileManager::_firstNodePool

Definition at line 71 of file ShinyManager.h.

Referenced by allocMemInBytes().

◆ _firstUpdate

bool Shiny::ProfileManager::_firstUpdate

Definition at line 77 of file ShinyManager.h.

◆ _initialized

bool Shiny::ProfileManager::_initialized

Definition at line 76 of file ShinyManager.h.

Referenced by _init(), and _uninit().

◆ _lastNodePool

ProfileNodePool* Shiny::ProfileManager::_lastNodePool

Definition at line 70 of file ShinyManager.h.

◆ _lastTick

tick_t Shiny::ProfileManager::_lastTick

Definition at line 50 of file ShinyManager.h.

Referenced by _appendTicksToCurNode(), and _init().

◆ _lastZone

ProfileZone* Shiny::ProfileManager::_lastZone

Definition at line 68 of file ShinyManager.h.

◆ _lookupCount

uint64_t Shiny::ProfileManager::_lookupCount

Definition at line 59 of file ShinyManager.h.

Referenced by _incLookup(), and lookupSuccessRate().

◆ _lookupSuccessCount

uint64_t Shiny::ProfileManager::_lookupSuccessCount

Definition at line 60 of file ShinyManager.h.

Referenced by _incLookupSuccess(), and lookupSuccessRate().

◆ _nodeTable

ProfileNodeTable* Shiny::ProfileManager::_nodeTable

Definition at line 56 of file ShinyManager.h.

◆ _tableMask

uint32_t Shiny::ProfileManager::_tableMask

Definition at line 54 of file ShinyManager.h.

◆ _tableSize

uint32_t Shiny::ProfileManager::_tableSize

Definition at line 63 of file ShinyManager.h.

Referenced by allocMemInBytes(), and tableUsage().

◆ instance

ProfileManager Shiny::ProfileManager::instance
static

◆ nodeCount

uint32_t Shiny::ProfileManager::nodeCount

Definition at line 65 of file ShinyManager.h.

Referenced by outputNodesAsString(), and tableUsage().

◆ rootNode

ProfileNode Shiny::ProfileManager::rootNode

Definition at line 73 of file ShinyManager.h.

Referenced by _init(), _uninit(), and outputNodesAsString().

◆ rootZone

ProfileZone Shiny::ProfileManager::rootZone

Definition at line 74 of file ShinyManager.h.

Referenced by _uninit(), and outputZonesAsString().

◆ zoneCount

uint32_t Shiny::ProfileManager::zoneCount

Definition at line 66 of file ShinyManager.h.

Referenced by outputZonesAsString(), and staticMemInBytes().


The documentation for this struct was generated from the following file: