summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracethreadrecorder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lltracethreadrecorder.cpp')
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index af66a69492..5a6ff14f97 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -171,15 +171,20 @@ void SlaveThreadRecorder::SharedData::copyTo( Recording& sink )
// MasterThreadRecorder
///////////////////////////////////////////////////////////////////////
+LLFastTimer::DeclareTimer FTM_PULL_TRACE_DATA_FROM_SLAVES("Pull slave trace data");
void MasterThreadRecorder::pullFromSlaveThreads()
{
+ LLFastTimer _(FTM_PULL_TRACE_DATA_FROM_SLAVES);
+ if (mActiveRecordings.empty()) return;
+
LLMutexLock lock(&mSlaveListMutex);
+ Recording& target_recording = mActiveRecordings.front().mBaseline;
for (slave_thread_recorder_list_t::iterator it = mSlaveThreadRecorders.begin(), end_it = mSlaveThreadRecorders.end();
it != end_it;
++it)
{
- (*it)->mRecorder->mSharedData.copyTo((*it)->mSlaveRecording);
+ (*it)->mSharedData.copyTo(target_recording);
}
}
@@ -187,7 +192,7 @@ void MasterThreadRecorder::addSlaveThread( class SlaveThreadRecorder* child )
{
LLMutexLock lock(&mSlaveListMutex);
- mSlaveThreadRecorders.push_back(new SlaveThreadRecorderProxy(child));
+ mSlaveThreadRecorders.push_back(child);
}
void MasterThreadRecorder::removeSlaveThread( class SlaveThreadRecorder* child )
@@ -198,7 +203,7 @@ void MasterThreadRecorder::removeSlaveThread( class SlaveThreadRecorder* child )
it != end_it;
++it)
{
- if ((*it)->mRecorder == child)
+ if ((*it) == child)
{
mSlaveThreadRecorders.erase(it);
break;
@@ -212,12 +217,4 @@ void MasterThreadRecorder::pushToMaster()
MasterThreadRecorder::MasterThreadRecorder()
{}
-///////////////////////////////////////////////////////////////////////
-// MasterThreadRecorder::SlaveThreadTraceProxy
-///////////////////////////////////////////////////////////////////////
-
-MasterThreadRecorder::SlaveThreadRecorderProxy::SlaveThreadRecorderProxy( class SlaveThreadRecorder* recorder)
-: mRecorder(recorder)
-{}
-
}