summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-03 19:04:51 -0700
committerRichard Linden <none@none>2013-10-03 19:04:51 -0700
commitf8a85003ddd4bee1ae00fc329c1c1d66d6100cbd (patch)
tree2e375eabfc5dcba0155a8201e3a356dd4a18580e /indra/llcommon/lltracerecording.cpp
parent1821fa12838974c4eb7de2b6e9f79bf8a4cf23f1 (diff)
more memory optimizations of lltrace
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index c33d9aedcc..06b4351339 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -45,7 +45,7 @@ Recording::Recording(EPlayState state)
: mElapsedSeconds(0),
mInHandOff(false)
{
- claim_alloc(gTraceMemStat, sizeof(*this));
+ claim_alloc(gTraceMemStat, this);
mBuffers = new AccumulatorBufferGroup();
claim_alloc(gTraceMemStat, mBuffers);
setPlayState(state);
@@ -53,7 +53,7 @@ Recording::Recording(EPlayState state)
Recording::Recording( const Recording& other )
{
- claim_alloc(gTraceMemStat, sizeof(*this));
+ claim_alloc(gTraceMemStat, this);
*this = other;
}
@@ -79,7 +79,7 @@ Recording& Recording::operator = (const Recording& other)
Recording::~Recording()
{
- disclaim_alloc(gTraceMemStat, sizeof(*this));
+ disclaim_alloc(gTraceMemStat, this);
disclaim_alloc(gTraceMemStat, mBuffers);
if (isStarted() && LLTrace::get_thread_recorder().notNull())
@@ -209,32 +209,32 @@ F64Kilobytes Recording::getLastValue(const TraceType<MemStatAccumulator>& stat)
F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat)
{
- return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mFootprintAllocations.getSum());
+ return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocations.getSum());
}
F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat)
{
- return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mFootprintAllocations.getSum() / mElapsedSeconds.value());
+ return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocations.getSum() / mElapsedSeconds.value());
}
S32 Recording::getSampleCount(const TraceType<MemStatAccumulator::AllocationFacet>& stat)
{
- return mBuffers->mMemStats[stat.getIndex()].mFootprintAllocations.getSampleCount();
+ return mBuffers->mMemStats[stat.getIndex()].mAllocations.getSampleCount();
}
F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat)
{
- return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mFootprintDeallocations.getSum());
+ return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSum());
}
F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat)
{
- return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mFootprintDeallocations.getSum() / mElapsedSeconds.value());
+ return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSum() / mElapsedSeconds.value());
}
S32 Recording::getSampleCount(const TraceType<MemStatAccumulator::DeallocationFacet>& stat)
{
- return mBuffers->mMemStats[stat.getIndex()].mFootprintDeallocations.getSampleCount();
+ return mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSampleCount();
}
F64 Recording::getSum( const TraceType<CountAccumulator>& stat )
@@ -339,12 +339,12 @@ PeriodicRecording::PeriodicRecording( S32 num_periods, EPlayState state)
mRecordingPeriods(num_periods ? num_periods : 1)
{
setPlayState(state);
- claim_alloc(gTraceMemStat, sizeof(*this));
+ claim_alloc(gTraceMemStat, this);
}
PeriodicRecording::~PeriodicRecording()
{
- disclaim_alloc(gTraceMemStat, sizeof(*this));
+ disclaim_alloc(gTraceMemStat, this);
}
void PeriodicRecording::nextPeriod()