summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfasttimer.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-17 20:11:43 -0800
committerRichard Linden <none@none>2013-01-17 20:11:43 -0800
commit43a92d01afdb4f1dd4003059b79f87e9687527a1 (patch)
tree44327860f7de3b8a1475bc2dd3322fd459ee943b /indra/llcommon/llfasttimer.h
parent486743e77efaa3926ddc2c0d666a0a7192700475 (diff)
SH-3406 WIP convert fast timers to lltrace system
fixed some uninitialized variables root timer accumulator was being initialized to NULL
Diffstat (limited to 'indra/llcommon/llfasttimer.h')
-rw-r--r--indra/llcommon/llfasttimer.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 2d87629561..06de8ea6ee 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -74,7 +74,7 @@ public:
private:
U64 mStartTime;
- BlockTimerStackRecord mLastTimerData;
+ BlockTimerStackRecord mParentTimerData;
};
// stores a "named" timer instance to be reused via multiple BlockTimer stack instances
@@ -280,10 +280,11 @@ LL_FORCE_INLINE BlockTimer::BlockTimer(TimeBlock& timer)
TimeBlockAccumulator* accumulator = timer.getPrimaryAccumulator();
accumulator->mActiveCount++;
// keep current parent as long as it is active when we are
+ llassert(accumulator->mParent);
accumulator->mMoveUpTree |= (accumulator->mParent->getPrimaryAccumulator()->mActiveCount == 0);
// store top of stack
- mLastTimerData = *cur_timer_data;
+ mParentTimerData = *cur_timer_data;
// push new information
cur_timer_data->mActiveTimer = this;
cur_timer_data->mAccumulator = accumulator;
@@ -305,13 +306,13 @@ LL_FORCE_INLINE BlockTimer::~BlockTimer()
// store last caller to bootstrap tree creation
// do this in the destructor in case of recursion to get topmost caller
- accumulator->mLastAccumulator = mLastTimerData.mAccumulator;
+ accumulator->mLastAccumulator = mParentTimerData.mAccumulator;
// we are only tracking self time, so subtract our total time delta from parents
- mLastTimerData.mChildTime += total_time;
+ mParentTimerData.mChildTime += total_time;
//pop stack
- *cur_timer_data = mLastTimerData;
+ *cur_timer_data = mParentTimerData;
#endif
}