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, 13 insertions, 6 deletions
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 9115a52fd1..b2c6fe3b80 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -68,10 +68,7 @@ void ThreadRecorder::activate( Recording* recording )
mPrimaryRecording = &mActiveRecordings.front().mBaseline;
}
-//TODO: consider merging results down the list to one past the buffered item.
-// this would require 2 buffers per sampler, to separate current total from running total
-
-void ThreadRecorder::deactivate( Recording* recording )
+std::list<ThreadRecorder::ActiveRecording>::iterator ThreadRecorder::update( Recording* recording )
{
for (std::list<ActiveRecording>::iterator it = mActiveRecordings.begin(), end_it = mActiveRecordings.end();
it != end_it;
@@ -92,10 +89,20 @@ void ThreadRecorder::deactivate( Recording* recording )
next_it->mBaseline.makePrimary();
mPrimaryRecording = &next_it->mBaseline;
}
- mActiveRecordings.erase(it);
- break;
+ return it;
}
}
+
+ return mActiveRecordings.end();
+}
+
+void ThreadRecorder::deactivate( Recording* recording )
+{
+ std::list<ActiveRecording>::iterator it = update(recording);
+ if (it != mActiveRecordings.end())
+ {
+ mActiveRecordings.erase(it);
+ }
}
ThreadRecorder::ActiveRecording::ActiveRecording( Recording* source, Recording* target )