summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-04-11 21:59:38 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-04-11 21:59:38 +0200
commitd0102af56d3b1d5b1d9bf3c8eb9aeea77028b70e (patch)
treee31cee85f651a874c4b6edc7491efa0cb2ec93d5 /indra/llcommon/lltrace.h
parent17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 (diff)
parentda9a1dcb55548a249ff7a1255f3e518696b81245 (diff)
Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts: # indra/llcommon/llapp.cpp # indra/llcommon/llapp.h # indra/llimage/llimageworker.cpp # indra/llui/llcontainerview.cpp # indra/llui/llcontainerview.h # indra/llui/llkeywords.cpp # indra/llui/lltabcontainer.cpp # indra/llui/lltextbase.cpp # indra/newview/llappviewer.cpp # indra/newview/llfavoritesbar.cpp # indra/newview/llfavoritesbar.h # indra/newview/llfloaterimnearbychathandler.cpp # indra/newview/llfloaterpreference.cpp # indra/newview/llhudnametag.h # indra/newview/llinventorypanel.cpp # indra/newview/llinventorypanel.h # indra/newview/llmeshrepository.cpp # indra/newview/lloutfitgallery.cpp # indra/newview/lloutfitslist.cpp # indra/newview/llpaneleditwearable.cpp # indra/newview/llpanelprofilepicks.cpp # indra/newview/llpanelvoicedevicesettings.h # indra/newview/llpreviewscript.cpp # indra/newview/llpreviewscript.h # indra/newview/llselectmgr.cpp # indra/newview/lltranslate.cpp # indra/newview/llviewerassetupload.cpp # indra/newview/llviewermessage.cpp
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