summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-03-11 00:37:50 -0700
committerRichard Linden <none@none>2013-03-11 00:37:50 -0700
commit1a256eca280e41a672fc87e083db851ab180612c (patch)
treee6a299f9a5b908b322d54ff352035d349aeb7af5
parent4e3fddf271e6ff4557f594b6a8c036ab2a4e413f (diff)
renamed some variables/methods in LLTrace to make things clearer
-rw-r--r--indra/llcommon/lltrace.h1
-rw-r--r--indra/llcommon/lltracerecording.cpp4
-rw-r--r--indra/llcommon/lltracerecording.h2
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp30
-rw-r--r--indra/llcommon/lltracethreadrecorder.h2
5 files changed, 20 insertions, 19 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 44da1939c6..9bca3625b6 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -287,6 +287,7 @@ public:
{
mNumSamples++;
mSum += value;
+ // NOTE: both conditions will hold on first pass through
if (value < mMin)
{
mMin = value;
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index ab8dbce2ce..3df06c5172 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -109,10 +109,10 @@ void Recording::handleSplitTo(Recording& other)
{
stop();
other.restart();
- syncTo(other);
+ handOffTo(other);
}
-void Recording::syncTo(Recording& other)
+void Recording::handOffTo(Recording& other)
{
other.mCountsFloat.write()->reset(mCountsFloat);
other.mMeasurementsFloat.write()->reset(mMeasurementsFloat);
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index 6b4d4357db..7dd3b98187 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -218,7 +218,7 @@ namespace LLTrace
LLUnit<LLUnits::Seconds, F64> getDuration() const { return LLUnit<LLUnits::Seconds, F64>(mElapsedSeconds); }
- void syncTo(Recording& other);
+ void handOffTo(Recording& other);
private:
friend class ThreadRecorder;
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 113febcca8..d540a60308 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -97,11 +97,11 @@ void ThreadRecorder::activate( Recording* recording )
ActiveRecording* active_recording = new ActiveRecording(recording);
if (!mActiveRecordings.empty())
{
- mActiveRecordings.front()->mBaseline.syncTo(active_recording->mBaseline);
+ mActiveRecordings.front()->mPartialRecording.handOffTo(active_recording->mPartialRecording);
}
mActiveRecordings.push_front(active_recording);
- mActiveRecordings.front()->mBaseline.makePrimary();
+ mActiveRecordings.front()->mPartialRecording.makePrimary();
}
ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::update( Recording* recording )
@@ -118,10 +118,10 @@ ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::update( Record
if (next_it != mActiveRecordings.end())
{
// ...push our gathered data down to it
- (*next_it)->mBaseline.appendRecording((*it)->mBaseline);
+ (*next_it)->mPartialRecording.appendRecording((*it)->mPartialRecording);
}
- // copy accumulated measurements into result buffer and clear accumulator (mBaseline)
+ // copy accumulated measurements into result buffer and clear accumulator (mPartialRecording)
(*it)->moveBaselineToTarget();
if ((*it)->mTargetRecording == recording)
@@ -171,16 +171,16 @@ ThreadRecorder::ActiveRecording::ActiveRecording( Recording* target )
void ThreadRecorder::ActiveRecording::moveBaselineToTarget()
{
- mTargetRecording->mMeasurementsFloat.write()->addSamples(*mBaseline.mMeasurementsFloat);
- mTargetRecording->mCountsFloat.write()->addSamples(*mBaseline.mCountsFloat);
- mTargetRecording->mMeasurements.write()->addSamples(*mBaseline.mMeasurements);
- mTargetRecording->mCounts.write()->addSamples(*mBaseline.mCounts);
- mTargetRecording->mStackTimers.write()->addSamples(*mBaseline.mStackTimers);
- mBaseline.mMeasurementsFloat.write()->reset();
- mBaseline.mCountsFloat.write()->reset();
- mBaseline.mMeasurements.write()->reset();
- mBaseline.mCounts.write()->reset();
- mBaseline.mStackTimers.write()->reset();
+ mTargetRecording->mMeasurementsFloat.write()->addSamples(*mPartialRecording.mMeasurementsFloat);
+ mTargetRecording->mCountsFloat.write()->addSamples(*mPartialRecording.mCountsFloat);
+ mTargetRecording->mMeasurements.write()->addSamples(*mPartialRecording.mMeasurements);
+ mTargetRecording->mCounts.write()->addSamples(*mPartialRecording.mCounts);
+ mTargetRecording->mStackTimers.write()->addSamples(*mPartialRecording.mStackTimers);
+ mPartialRecording.mMeasurementsFloat.write()->reset();
+ mPartialRecording.mCountsFloat.write()->reset();
+ mPartialRecording.mMeasurements.write()->reset();
+ mPartialRecording.mCounts.write()->reset();
+ mPartialRecording.mStackTimers.write()->reset();
}
@@ -251,7 +251,7 @@ void MasterThreadRecorder::pullFromSlaveThreads()
LLMutexLock lock(&mSlaveListMutex);
- Recording& target_recording = mActiveRecordings.front()->mBaseline;
+ Recording& target_recording = mActiveRecordings.front()->mPartialRecording;
for (slave_thread_recorder_list_t::iterator it = mSlaveThreadRecorders.begin(), end_it = mSlaveThreadRecorders.end();
it != end_it;
++it)
diff --git a/indra/llcommon/lltracethreadrecorder.h b/indra/llcommon/lltracethreadrecorder.h
index 0e6c091900..ee2e04236a 100644
--- a/indra/llcommon/lltracethreadrecorder.h
+++ b/indra/llcommon/lltracethreadrecorder.h
@@ -59,7 +59,7 @@ namespace LLTrace
ActiveRecording(Recording* target);
Recording* mTargetRecording;
- Recording mBaseline;
+ Recording mPartialRecording;
void moveBaselineToTarget();
};