diff options
author | Richard Linden <none@none> | 2013-09-25 19:12:35 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-09-25 19:12:35 -0700 |
commit | 053d97db1b283ca2548dc1f64756ddfc5166158f (patch) | |
tree | 5bcbc17e5092fc54791e880bc4640d4b43af7e50 /indra/llcommon/llfasttimer.cpp | |
parent | ab8f64a96754edaa68dd1ff97b9519eff4496aa6 (diff) |
better memory usage for LLTrace (tighter packing of recording arrays)
removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway)
improved MemTrackable API, better separation of shadow and footprint
added memory usage stats to floater_stats.xml
Diffstat (limited to 'indra/llcommon/llfasttimer.cpp')
-rwxr-xr-x | indra/llcommon/llfasttimer.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 52b3bb39b2..32ef01b2b6 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -259,15 +259,12 @@ void TimeBlock::updateTimes() && cur_timer->mParentTimerData.mActiveTimer != cur_timer) // root defined by parent pointing to self { U64 cumulative_time_delta = cur_time - cur_timer->mStartTime; - accumulator->mTotalTimeCounter += cumulative_time_delta - - (accumulator->mTotalTimeCounter - - cur_timer->mBlockStartTotalTimeCounter); + cur_timer->mStartTime = cur_time; + + accumulator->mTotalTimeCounter += cumulative_time_delta; accumulator->mSelfTimeCounter += cumulative_time_delta - stack_record->mChildTime; stack_record->mChildTime = 0; - cur_timer->mStartTime = cur_time; - cur_timer->mBlockStartTotalTimeCounter = accumulator->mTotalTimeCounter; - stack_record = &cur_timer->mParentTimerData; accumulator = &stack_record->mTimeBlock->getCurrentAccumulator(); cur_timer = stack_record->mActiveTimer; @@ -423,7 +420,6 @@ void TimeBlock::writeLog(std::ostream& os) TimeBlockAccumulator::TimeBlockAccumulator() : mTotalTimeCounter(0), mSelfTimeCounter(0), - mStartTotalTimeCounter(0), mCalls(0), mLastCaller(NULL), mActiveCount(0), @@ -436,7 +432,7 @@ void TimeBlockAccumulator::addSamples( const TimeBlockAccumulator& other, EBuffe // we can't merge two unrelated time block samples, as that will screw with the nested timings // due to the call hierarchy of each thread llassert(append_type == SEQUENTIAL); - mTotalTimeCounter += other.mTotalTimeCounter - other.mStartTotalTimeCounter; + mTotalTimeCounter += other.mTotalTimeCounter; mSelfTimeCounter += other.mSelfTimeCounter; mCalls += other.mCalls; mLastCaller = other.mLastCaller; @@ -449,21 +445,15 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other ) { mCalls = 0; mSelfTimeCounter = 0; + mTotalTimeCounter = 0; if (other) { - mStartTotalTimeCounter = other->mTotalTimeCounter; - mTotalTimeCounter = mStartTotalTimeCounter; - mLastCaller = other->mLastCaller; mActiveCount = other->mActiveCount; mMoveUpTree = other->mMoveUpTree; mParent = other->mParent; } - else - { - mStartTotalTimeCounter = mTotalTimeCounter; - } } F64Seconds BlockTimer::getElapsedTime() |