diff options
author | Richard Linden <none@none> | 2013-08-21 14:06:57 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-08-21 14:06:57 -0700 |
commit | 2c6bc5afa59a88136fd6de4ebf0cb99ea7cdef3f (patch) | |
tree | c91e15225fc14b0ea753d8188199f8e7f806e7a5 /indra/llcommon/llfasttimer.h | |
parent | 6d9af374066421a1d8465a57795250a1614adcbb (diff) |
SH-4433 WIP Interesting: Statistics > Ping Sim is always 0 ms
made getPrimaryAccumulator return a reference since it was an
always non-null pointer
changed unit conversion to perform lazy division in order to avoid truncation
of timer values
Diffstat (limited to 'indra/llcommon/llfasttimer.h')
-rwxr-xr-x | indra/llcommon/llfasttimer.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index ccf71c3f4c..7bad6134c5 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -257,11 +257,11 @@ LL_FORCE_INLINE BlockTimer::BlockTimer(TimeBlock& timer) #if FAST_TIMER_ON BlockTimerStackRecord* cur_timer_data = LLThreadLocalSingletonPointer<BlockTimerStackRecord>::getInstance(); if (!cur_timer_data) return; - TimeBlockAccumulator* accumulator = timer.getPrimaryAccumulator(); - accumulator->mActiveCount++; - mBlockStartTotalTimeCounter = accumulator->mTotalTimeCounter; + TimeBlockAccumulator& accumulator = timer.getPrimaryAccumulator(); + accumulator.mActiveCount++; + mBlockStartTotalTimeCounter = accumulator.mTotalTimeCounter; // keep current parent as long as it is active when we are - accumulator->mMoveUpTree |= (accumulator->mParent->getPrimaryAccumulator()->mActiveCount == 0); + accumulator.mMoveUpTree |= (accumulator.mParent->getPrimaryAccumulator().mActiveCount == 0); // store top of stack mParentTimerData = *cur_timer_data; @@ -281,16 +281,16 @@ LL_FORCE_INLINE BlockTimer::~BlockTimer() BlockTimerStackRecord* cur_timer_data = LLThreadLocalSingletonPointer<BlockTimerStackRecord>::getInstance(); if (!cur_timer_data) return; - TimeBlockAccumulator* accumulator = cur_timer_data->mTimeBlock->getPrimaryAccumulator(); + TimeBlockAccumulator& accumulator = cur_timer_data->mTimeBlock->getPrimaryAccumulator(); - accumulator->mCalls++; - accumulator->mTotalTimeCounter += total_time - (accumulator->mTotalTimeCounter - mBlockStartTotalTimeCounter); - accumulator->mSelfTimeCounter += total_time - cur_timer_data->mChildTime; - accumulator->mActiveCount--; + accumulator.mCalls++; + accumulator.mTotalTimeCounter += total_time - (accumulator.mTotalTimeCounter - mBlockStartTotalTimeCounter); + accumulator.mSelfTimeCounter += total_time - cur_timer_data->mChildTime; + accumulator.mActiveCount--; // store last caller to bootstrap tree creation // do this in the destructor in case of recursion to get topmost caller - accumulator->mLastCaller = mParentTimerData.mTimeBlock; + accumulator.mLastCaller = mParentTimerData.mTimeBlock; // we are only tracking self time, so subtract our total time delta from parents mParentTimerData.mChildTime += total_time; |