summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracethreadrecorder.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-11-29 00:43:25 -0800
committerRichard Linden <none@none>2012-11-29 00:43:25 -0800
commit02d503bf8f8890c6d4b57dd09a1fde2973715b75 (patch)
tree046bbdcf3ff2d3d5ea36b616a00aa442ca5bdc5d /indra/llcommon/lltracethreadrecorder.cpp
parent0e1283cf6d17514a9a32595fc29df38a4b4b2d3a (diff)
SH-3406 WIP convert fast timers to lltrace system
moved runtime timer tree topology information to separate array instead of recording stack
Diffstat (limited to 'indra/llcommon/lltracethreadrecorder.cpp')
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index faaab4c8e7..0a2d79cf3a 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -41,25 +41,29 @@ ThreadRecorder::ThreadRecorder()
get_thread_recorder() = this;
mFullRecording.start();
- BlockTimer::sCurTimerData = new CurTimerData();
-}
+ mRootTimerData = new CurTimerData();
+ mRootTimerData->mTimerData = &BlockTimer::getRootTimer();
+ mRootTimerData->mTimerTreeData = new TimerTreeNode[AccumulatorBuffer<TimerAccumulator>::getDefaultBuffer().size()];
+ BlockTimer::sCurTimerData = mRootTimerData;
-ThreadRecorder::ThreadRecorder( const ThreadRecorder& other )
-: mFullRecording(other.mFullRecording)
-{
- get_thread_recorder() = this;
- mFullRecording.start();
+ mRootTimer = new Time(BlockTimer::getRootTimer());
+ mRootTimerData->mCurTimer = mRootTimer;
+
+ mRootTimerData->mTimerTreeData[BlockTimer::getRootTimer().getIndex()].mActiveCount = 1;
}
ThreadRecorder::~ThreadRecorder()
{
+ delete mRootTimer;
+
while(mActiveRecordings.size())
{
mActiveRecordings.front().mTargetRecording->stop();
}
get_thread_recorder() = NULL;
- delete BlockTimer::sCurTimerData.get();
BlockTimer::sCurTimerData = NULL;
+ delete [] mRootTimerData->mTimerTreeData;
+ delete mRootTimerData;
}
void ThreadRecorder::activate( Recording* recording )