From 02d503bf8f8890c6d4b57dd09a1fde2973715b75 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 29 Nov 2012 00:43:25 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system moved runtime timer tree topology information to separate array instead of recording stack --- indra/llcommon/lltrace.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/lltrace.h') diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 11651ef953..ad9f170aae 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -189,6 +189,11 @@ namespace LLTrace delete[] old_storage; } + size_t size() + { + return mNextStorageSlot; + } + static AccumulatorBuffer& getDefaultBuffer() { static AccumulatorBuffer sBuffer(STATIC_ALLOC); @@ -216,7 +221,7 @@ namespace LLTrace mAccumulatorIndex = AccumulatorBuffer::getDefaultBuffer().reserveSlot(); } - LL_FORCE_INLINE ACCUMULATOR& getPrimaryAccumulator() + LL_FORCE_INLINE ACCUMULATOR& getPrimaryAccumulator() const { return AccumulatorBuffer::getPrimaryStorage()[mAccumulatorIndex]; } @@ -399,6 +404,12 @@ namespace LLTrace U64 mSelfTimeCounter, mTotalTimeCounter; U32 mCalls; + }; + + class TimerTreeNode + { + public: + TimerTreeNode(); class BlockTimer* mLastCaller; // used to bootstrap tree construction U16 mActiveCount; // number of timers with this ID active on stack bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame -- cgit v1.2.3