summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-12 00:12:30 +0300
committerGitHub <noreply@github.com>2024-04-12 00:12:30 +0300
commitdfbbad813f3a1b9a151db7b25d3657590324ca4c (patch)
treee31cee85f651a874c4b6edc7491efa0cb2ec93d5 /indra/llcommon/lltrace.h
parent17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 (diff)
parentd0102af56d3b1d5b1d9bf3c8eb9aeea77028b70e (diff)
Merge pull request #1204 from Ansariel/DRTVWR-600-maint-A
Merge main into maint-A
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r--indra/llcommon/lltrace.h82
1 files changed, 0 insertions, 82 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 580cf0a5fd..21a5803a76 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -193,61 +193,6 @@ void add(CountStatHandle<T>& count, VALUE_T value)
#endif
}
-template<>
-class StatType<MemAccumulator::AllocationFacet>
-: public StatType<MemAccumulator>
-{
-public:
-
- StatType(const char* name, const char* description = "")
- : StatType<MemAccumulator>(name, description)
- {}
-};
-
-template<>
-class StatType<MemAccumulator::DeallocationFacet>
-: public StatType<MemAccumulator>
-{
-public:
-
- StatType(const char* name, const char* description = "")
- : StatType<MemAccumulator>(name, description)
- {}
-};
-
-class MemStatHandle : public StatType<MemAccumulator>
-{
-public:
- typedef StatType<MemAccumulator> stat_t;
- MemStatHandle(const char* name, const char* description = "")
- : stat_t(name, description)
- {
- mName = name;
- }
-
- void setName(const char* name)
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
- mName = name;
- setKey(name);
- }
-
- /*virtual*/ const char* getUnitLabel() const { return "KB"; }
-
- StatType<MemAccumulator::AllocationFacet>& allocations()
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
- return static_cast<StatType<MemAccumulator::AllocationFacet>&>(*(StatType<MemAccumulator>*)this);
- }
-
- StatType<MemAccumulator::DeallocationFacet>& deallocations()
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
- return static_cast<StatType<MemAccumulator::DeallocationFacet>&>(*(StatType<MemAccumulator>*)this);
- }
-};
-
-
// measures effective memory footprint of specified type
// specialize to cover different types
template<typename T, typename IS_MEM_TRACKABLE = void, typename IS_UNITS = void>
@@ -334,33 +279,6 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
}
};
-
-template<typename T>
-inline void claim_alloc(MemStatHandle& measurement, const T& value)
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-#if LL_TRACE_ENABLED
- auto size = MeasureMem<T>::measureFootprint(value);
- if(size == 0) return;
- MemAccumulator& accumulator = measurement.getCurrentAccumulator();
- accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size);
- accumulator.mAllocations.record(size);
-#endif
-}
-
-template<typename T>
-inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-#if LL_TRACE_ENABLED
- auto size = MeasureMem<T>::measureFootprint(value);
- if(size == 0) return;
- MemAccumulator& accumulator = measurement.getCurrentAccumulator();
- accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size);
- accumulator.mDeallocations.add(size);
-#endif
-}
-
}
#endif // LL_LLTRACE_H