summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracethreadrecorder.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-05-30 18:30:11 -0700
committerRichard Linden <none@none>2013-05-30 18:30:11 -0700
commitae355188327515d53b9c15c27ed576829fce3668 (patch)
tree1fd6d4816df45fde80fe5d862bfcd2cb9adb1c6c /indra/llcommon/lltracethreadrecorder.cpp
parentfe7959591633e4c6bda570c6fd19d7fdfec15454 (diff)
SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
fixed LLTrace::ExtendablePeriodicRecording::extend() to include *all* frame extensions gated SlaveThreadRecorder pushing to master based on master update rate reverted changes to LLThreadLocalSingletonPointer to not use offset-from-default trick
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()
{}