summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracethreadrecorder.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-05-30 19:00:08 -0700
committerRichard Linden <none@none>2013-05-30 19:00:08 -0700
commitae6763f7fcfbe52ea1b04c25603ac2305beafb9d (patch)
treefffe67ae8ce06af0e2c4ef0f874d140623efaa66 /indra/llcommon/lltracethreadrecorder.cpp
parentee0087709afe05a9fe38e3da743421faead9e02f (diff)
parentae355188327515d53b9c15c27ed576829fce3668 (diff)
Automated merge with bundle:c:\code\viewer-interesting+c:\users\richard\appdata\local\temp\thg.sszl0v\ssh__richard@hg.lindenlab.com_richard_viewer-interesting_kkjl59.hg
Diffstat (limited to 'indra/llcommon/lltracethreadrecorder.cpp')
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 75c7cb2ff1..89b5df1f94 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -202,14 +202,21 @@ SlaveThreadRecorder::~SlaveThreadRecorder()
mMasterRecorder.removeSlaveThread(this);
}
-void SlaveThreadRecorder::pushToMaster()
+bool SlaveThreadRecorder::pushToMaster()
{
- mThreadRecording.stop();
+ if (mPushCount != mMasterRecorder.getPullCount())
{
- LLMutexLock(mMasterRecorder.getSlaveListMutex());
- mSharedData.appendFrom(mThreadRecording);
+ mThreadRecording.stop();
+ {
+ LLMutexLock(mMasterRecorder.getSlaveListMutex());
+ mSharedData.appendFrom(mThreadRecording);
+ }
+ mThreadRecording.start();
+
+ mPushCount = mMasterRecorder.getPullCount();
+ return true;
}
- mThreadRecording.start();
+ return false;
}
void SlaveThreadRecorder::SharedData::appendFrom( const Recording& source )
@@ -264,6 +271,8 @@ void MasterThreadRecorder::pullFromSlaveThreads()
(*it)->mSharedData.mergeTo(target_recording_buffers);
(*it)->mSharedData.reset();
}
+
+ mPullCount++;
}
void MasterThreadRecorder::addSlaveThread( class SlaveThreadRecorder* child )
@@ -289,8 +298,10 @@ void MasterThreadRecorder::removeSlaveThread( class SlaveThreadRecorder* child )
}
}
-void MasterThreadRecorder::pushToMaster()
-{}
+bool MasterThreadRecorder::pushToMaster()
+{
+ return false;
+}
MasterThreadRecorder::MasterThreadRecorder()
{}