diff options
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/lltrace.h | 85 | ||||
| -rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 58 | ||||
| -rw-r--r-- | indra/llcommon/lltracerecording.cpp | 105 | ||||
| -rw-r--r-- | indra/llcommon/lltracerecording.h | 55 |
4 files changed, 207 insertions, 96 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index bf1119d694..5c833ea287 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -200,7 +200,7 @@ void add(CountStatHandle<T>& count, VALUE_T value) } template<> -class TraceType<MemStatAccumulator::AllocationCountFacet> +class TraceType<MemStatAccumulator::AllocationFacet> : public TraceType<MemStatAccumulator> { public: @@ -211,7 +211,7 @@ public: }; template<> -class TraceType<MemStatAccumulator::DeallocationCountFacet> +class TraceType<MemStatAccumulator::DeallocationFacet> : public TraceType<MemStatAccumulator> { public: @@ -222,6 +222,28 @@ public: }; template<> +class TraceType<MemStatAccumulator::ShadowAllocationFacet> + : public TraceType<MemStatAccumulator> +{ +public: + + TraceType(const char* name, const char* description = "") + : TraceType<MemStatAccumulator>(name, description) + {} +}; + +template<> +class TraceType<MemStatAccumulator::ShadowDeallocationFacet> + : public TraceType<MemStatAccumulator> +{ +public: + + TraceType(const char* name, const char* description = "") + : TraceType<MemStatAccumulator>(name, description) + {} +}; + +template<> class TraceType<MemStatAccumulator::ShadowMemFacet> : public TraceType<MemStatAccumulator> { @@ -246,61 +268,60 @@ public: setKey(name); } - /*virtual*/ const char* getUnitLabel() const { return "B"; } + /*virtual*/ const char* getUnitLabel() const { return "KB"; } - TraceType<MemStatAccumulator::AllocationCountFacet>& allocationCount() + TraceType<MemStatAccumulator::AllocationFacet>& allocations() { - return static_cast<TraceType<MemStatAccumulator::AllocationCountFacet>&>(*(TraceType<MemStatAccumulator>*)this); + return static_cast<TraceType<MemStatAccumulator::AllocationFacet>&>(*(TraceType<MemStatAccumulator>*)this); } - TraceType<MemStatAccumulator::DeallocationCountFacet>& deallocationCount() + TraceType<MemStatAccumulator::DeallocationFacet>& deallocations() { - return static_cast<TraceType<MemStatAccumulator::DeallocationCountFacet>&>(*(TraceType<MemStatAccumulator>*)this); + return static_cast<TraceType<MemStatAccumulator::DeallocationFacet>&>(*(TraceType<MemStatAccumulator>*)this); } - TraceType<MemStatAccumulator::ShadowMemFacet>& childMem() + TraceType<MemStatAccumulator::ShadowAllocationFacet>& shadowAllocations() { - return static_cast<TraceType<MemStatAccumulator::ShadowMemFacet>&>(*(TraceType<MemStatAccumulator>*)this); + return static_cast<TraceType<MemStatAccumulator::ShadowAllocationFacet>&>(*(TraceType<MemStatAccumulator>*)this); } -}; -inline void track_alloc(MemStatHandle& measurement, size_t size) -{ - MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); - accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); - accumulator.mAllocatedCount++; -} + TraceType<MemStatAccumulator::ShadowDeallocationFacet>& shadowDeallocations() + { + return static_cast<TraceType<MemStatAccumulator::ShadowDeallocationFacet>&>(*(TraceType<MemStatAccumulator>*)this); + } -inline void track_dealloc(MemStatHandle& measurement, size_t size) -{ - MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); - accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); - accumulator.mAllocatedCount--; - accumulator.mDeallocatedCount++; -} + TraceType<MemStatAccumulator::ShadowMemFacet>& shadowMem() + { + return static_cast<TraceType<MemStatAccumulator::ShadowMemFacet>&>(*(TraceType<MemStatAccumulator>*)this); + } +}; inline void claim_mem(MemStatHandle& measurement, size_t size) { MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); + accumulator.mAllocated.add(1); } inline void disclaim_mem(MemStatHandle& measurement, size_t size) { MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); + accumulator.mDeallocated.add(1); } inline void claim_shadow_mem(MemStatHandle& measurement, size_t size) { MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); accumulator.mShadowSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); + accumulator.mShadowAllocated.add(1); } inline void disclaim_shadow_mem(MemStatHandle& measurement, size_t size) { MemStatAccumulator& accumulator = measurement.getCurrentAccumulator(); accumulator.mShadowSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); + accumulator.mShadowDeallocated.add(1); } // measures effective memory footprint of specified type @@ -388,10 +409,12 @@ class MemTrackable typedef MemTrackable<DERIVED, ALIGNMENT> mem_trackable_t; static MemStatHandle sMemStat; + public: typedef void mem_trackable_tag_t; MemTrackable() + : mMemFootprint(0) { static bool name_initialized = false; if (!name_initialized) @@ -406,9 +429,14 @@ public: memDisclaim(mMemFootprint); } + static MemStatHandle& getMemStatHandle() + { + return sMemStat; + } + void* operator new(size_t size) { - track_alloc(sMemStat, size); + claim_mem(sMemStat, size); if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) { @@ -430,7 +458,7 @@ public: void operator delete(void* ptr, size_t size) { - track_dealloc(sMemStat, size); + disclaim_mem(sMemStat, size); if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) { @@ -452,7 +480,7 @@ public: void *operator new [](size_t size) { - track_alloc(sMemStat, size); + claim_mem(sMemStat, size); if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) { @@ -474,10 +502,7 @@ public: void operator delete[](void* ptr, size_t size) { - MemStatAccumulator& accumulator = sMemStat.getCurrentAccumulator(); - accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); - accumulator.mAllocatedCount--; - accumulator.mDeallocatedCount++; + disclaim_mem(sMemStat, size); if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) { diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index c5a0693fef..37a35f4e23 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -475,40 +475,62 @@ namespace LLTrace typedef MemStatAccumulator self_t; // fake classes that allows us to view different facets of underlying statistic - struct AllocationCountFacet + struct AllocationFacet { - typedef U32 value_t; + typedef F64Bytes value_t; }; - struct DeallocationCountFacet + struct DeallocationFacet { - typedef U32 value_t; + typedef F64Bytes value_t; }; - struct ShadowMemFacet + struct ShadowAllocationFacet { typedef F64Bytes value_t; }; - MemStatAccumulator() - : mAllocatedCount(0), - mDeallocatedCount(0) - {} + struct ShadowDeallocationFacet + { + typedef F64Bytes value_t; + }; + + struct ShadowMemFacet + { + typedef F64Bytes value_t; + }; void addSamples(const MemStatAccumulator& other, EBufferAppendType append_type) { - mSize.addSamples(other.mSize, append_type); - mShadowSize.addSamples(other.mShadowSize, append_type); - mAllocatedCount += other.mAllocatedCount; - mDeallocatedCount += other.mDeallocatedCount; + mAllocated.addSamples(other.mAllocated, append_type); + mDeallocated.addSamples(other.mDeallocated, append_type); + if (append_type == SEQUENTIAL) + { + mSize.addSamples(other.mSize, SEQUENTIAL); + mShadowSize.addSamples(other.mShadowSize, SEQUENTIAL); + } + else + { + F64 allocation_delta(other.mAllocated.getSum() - other.mDeallocated.getSum()); + mSize.sample(mSize.hasValue() + ? mSize.getLastValue() + allocation_delta + : allocation_delta); + + F64 shadow_allocation_delta(other.mShadowAllocated.getSum() - other.mShadowDeallocated.getSum()); + mShadowSize.sample(mShadowSize.hasValue() + ? mShadowSize.getLastValue() + shadow_allocation_delta + : shadow_allocation_delta); + } } void reset(const MemStatAccumulator* other) { mSize.reset(other ? &other->mSize : NULL); mShadowSize.reset(other ? &other->mShadowSize : NULL); - mAllocatedCount = 0; - mDeallocatedCount = 0; + mAllocated.reset(other ? &other->mAllocated : NULL); + mDeallocated.reset(other ? &other->mDeallocated : NULL); + mShadowAllocated.reset(other ? &other->mShadowAllocated : NULL); + mShadowDeallocated.reset(other ? &other->mShadowDeallocated : NULL); } void sync(F64SecondsImplicit time_stamp) @@ -519,8 +541,10 @@ namespace LLTrace SampleAccumulator mSize, mShadowSize; - int mAllocatedCount, - mDeallocatedCount; + CountAccumulator mAllocated, + mDeallocated, + mShadowAllocated, + mShadowDeallocated; }; struct AccumulatorBufferGroup : public LLRefCount diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 7155cfa40a..c606007d89 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -178,66 +178,115 @@ bool Recording::hasValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& st return mBuffers->mMemStats[stat.getIndex()].mShadowSize.hasValue(); } -F64Bytes Recording::getMin(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMin(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); } -F64Bytes Recording::getMean(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMean(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); } -F64Bytes Recording::getMax(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getMax(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); } -F64Bytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); } -F64Bytes Recording::getLastValue(const TraceType<MemStatAccumulator>& stat) +F64Kilobytes Recording::getLastValue(const TraceType<MemStatAccumulator>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } -F64Bytes Recording::getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMin()); } -F64Bytes Recording::getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMean()); } -F64Bytes Recording::getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getMax()); } -F64Bytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getStandardDeviation()); } -F64Bytes Recording::getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) +F64Kilobytes Recording::getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat) { return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowSize.getLastValue()); } -U32 Recording::getSum(const TraceType<MemStatAccumulator::AllocationCountFacet>& stat) +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mAllocatedCount; + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocated.getSum()); } -U32 Recording::getSum(const TraceType<MemStatAccumulator::DeallocationCountFacet>& stat) +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mAllocatedCount; + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocated.getSum() / mElapsedSeconds.value()); } +U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::AllocationFacet>& stat) +{ + return mBuffers->mMemStats[stat.getIndex()].mAllocated.getSampleCount(); +} + +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSum()); +} + +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSum() / mElapsedSeconds.value()); +} + +U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::DeallocationFacet>& stat) +{ + return mBuffers->mMemStats[stat.getIndex()].mDeallocated.getSampleCount(); +} + +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSum()); +} + +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSum() / mElapsedSeconds.value()); +} + +U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat) +{ + return mBuffers->mMemStats[stat.getIndex()].mShadowAllocated.getSampleCount(); +} + +F64Kilobytes Recording::getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowDeallocated.getSum()); +} + +F64Kilobytes Recording::getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) +{ + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mShadowDeallocated.getSum() / mElapsedSeconds.value()); +} + +U32 Recording::getSampleCount(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat) +{ + return mBuffers->mMemStats[stat.getIndex()].mShadowDeallocated.getSampleCount(); +} F64 Recording::getSum( const TraceType<CountAccumulator>& stat ) { @@ -718,12 +767,12 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const TraceType<SampleAccumul } -F64Bytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes min_val(std::numeric_limits<F64>::max()); + F64Kilobytes min_val(std::numeric_limits<F64>::max()); for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); @@ -733,17 +782,17 @@ F64Bytes PeriodicRecording::getPeriodMin( const TraceType<MemStatAccumulator>& s return min_val; } -F64Bytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, size_t num_periods) { return getPeriodMin(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/) +F64Kilobytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes max_val(0.0); + F64Kilobytes max_val(0.0); for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); @@ -753,17 +802,17 @@ F64Bytes PeriodicRecording::getPeriodMax(const TraceType<MemStatAccumulator>& st return max_val; } -F64Bytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, size_t num_periods) { return getPeriodMax(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes mean(0); + F64Kilobytes mean(0); for (S32 i = 1; i <= num_periods; i++) { @@ -774,17 +823,17 @@ F64Bytes PeriodicRecording::getPeriodMean( const TraceType<MemStatAccumulator>& return mean / F64(num_periods); } -F64Bytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, size_t num_periods) { return getPeriodMean(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } -F64Bytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) +F64Kilobytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatAccumulator>& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - F64Bytes period_mean = getPeriodMean(stat, num_periods); + F64Kilobytes period_mean = getPeriodMean(stat, num_periods); S32 valid_period_count = 0; F64 sum_of_squares = 0; @@ -793,18 +842,18 @@ F64Bytes PeriodicRecording::getPeriodStandardDeviation( const TraceType<MemStatA Recording& recording = getPrevRecording(i); if (recording.hasValue(stat)) { - F64Bytes delta = recording.getMean(stat) - period_mean; + F64Kilobytes delta = recording.getMean(stat) - period_mean; sum_of_squares += delta.value() * delta.value(); valid_period_count++; } } - return F64Bytes(valid_period_count + return F64Kilobytes(valid_period_count ? sqrt(sum_of_squares / (F64)valid_period_count) : NaN); } -F64Bytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods) +F64Kilobytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods) { return getPeriodStandardDeviation(static_cast<const TraceType<MemStatAccumulator>&>(stat), num_periods); } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 2f5cefa8eb..3f7737b20b 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -177,23 +177,36 @@ namespace LLTrace F32 getPerSec(const TraceType<TimeBlockAccumulator::CallCountFacet>& stat); // Memory accessors - bool hasValue(const TraceType<MemStatAccumulator>& stat);
+ bool hasValue(const TraceType<MemStatAccumulator>& stat); bool hasValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMin(const TraceType<MemStatAccumulator>& stat); - F64Bytes getMean(const TraceType<MemStatAccumulator>& stat); - F64Bytes getMax(const TraceType<MemStatAccumulator>& stat); - F64Bytes getStandardDeviation(const TraceType<MemStatAccumulator>& stat); - F64Bytes getLastValue(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getMin(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getMean(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getMax(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getStandardDeviation(const TraceType<MemStatAccumulator>& stat); + F64Kilobytes getLastValue(const TraceType<MemStatAccumulator>& stat); - F64Bytes getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - F64Bytes getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getMin(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getMean(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getMax(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getStandardDeviation(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); + F64Kilobytes getLastValue(const TraceType<MemStatAccumulator::ShadowMemFacet>& stat); - U32 getSum(const TraceType<MemStatAccumulator::AllocationCountFacet>& stat); - U32 getSum(const TraceType<MemStatAccumulator::DeallocationCountFacet>& stat); + F64Kilobytes getSum(const TraceType<MemStatAccumulator::AllocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::AllocationFacet>& stat); + U32 getSampleCount(const TraceType<MemStatAccumulator::AllocationFacet>& stat); + + F64Kilobytes getSum(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); + U32 getSampleCount(const TraceType<MemStatAccumulator::DeallocationFacet>& stat); + + F64Kilobytes getSum(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); + U32 getSampleCount(const TraceType<MemStatAccumulator::ShadowAllocationFacet>& stat); + + F64Kilobytes getSum(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); + F64Kilobytes getPerSec(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); + U32 getSampleCount(const TraceType<MemStatAccumulator::ShadowDeallocationFacet>& stat); // CountStatHandle accessors F64 getSum(const TraceType<CountAccumulator>& stat); @@ -397,8 +410,8 @@ namespace LLTrace return T(getPeriodMin(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMin(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMin(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMin(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMin(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -461,8 +474,8 @@ namespace LLTrace return T(getPeriodMax(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMax(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMax(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMax(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -530,8 +543,8 @@ namespace LLTrace return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodMean(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodMean(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMean(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodMean(const MemStatHandle& stat, size_t num_periods = U32_MAX); template <typename T> typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) @@ -580,8 +593,8 @@ namespace LLTrace return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods)); } - F64Bytes getPeriodStandardDeviation(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); - F64Bytes getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodStandardDeviation(const TraceType<MemStatAccumulator>& stat, size_t num_periods = U32_MAX); + F64Kilobytes getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods = U32_MAX); private: // implementation for LLStopWatchControlsMixin |
