From 1f56e57008f5a50c9e75fc0b4512c483ac359a52 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 18 Dec 2012 00:58:26 -0800 Subject: SH-3468 WIP add memory tracking base class created memory tracking trace type instrumented a few classes with memory tracking --- indra/llimage/llimage.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index b87ce6f060..d945d54404 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -30,6 +30,7 @@ #include "lluuid.h" #include "llstring.h" #include "llthread.h" +#include "lltrace.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 @@ -110,7 +111,9 @@ protected: //============================================================================ // Image base class -class LLImageBase : public LLThreadSafeRefCount +class LLImageBase +: public LLThreadSafeRefCount, + public LLTrace::MemTrackable { protected: virtual ~LLImageBase(); -- cgit v1.2.3 From cbff0e7ab8afeebb6ddab854d35ea12ef9a9930a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 4 Jan 2013 13:48:35 -0800 Subject: SH-3468 WIP add memory tracking base class attempted fix for gcc compile errors can't use typeid() on a class that doesn't have a method defined in a translation unit fix is to force classes deriving from LLMemTrackable to use their own static member named sMemStat --- indra/llimage/llimage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index d945d54404..6eafcf1bf7 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,6 +165,8 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} + static LLTrace::MemStat sMemStat; + private: U8 *mData; S32 mDataSize; -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/llimage/llimage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 6eafcf1bf7..5487bc6370 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,7 +165,7 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; private: U8 *mData; -- cgit v1.2.3 From 04bdc8ba83c297945dd60489c241b88adf892ff4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 1 Jul 2013 17:04:01 -0700 Subject: SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0% also, removed LLTrace::init and cleanup removed derived class implementation of memory stat for LLMemTrackable is automatic now --- indra/llimage/llimage.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 504b7e4795..b2bfdba3f8 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,8 +165,6 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} - static LLTrace::MemStatHandle sMemStat; - private: U8 *mData; S32 mDataSize; -- cgit v1.2.3 From 8208a40412fac35593d4b8b13f43c6be5e4d6990 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 1 Jul 2013 18:50:51 -0700 Subject: BUILDFIX: reverted changes that attempted to automate mem track stat definition as they don't work on gcc/clang --- indra/llimage/llimage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index b2bfdba3f8..504b7e4795 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,6 +165,8 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} + static LLTrace::MemStatHandle sMemStat; + private: U8 *mData; S32 mDataSize; -- cgit v1.2.3 From 075a7bcc980b0ca0d2888d344b6afa8ab5b52d85 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 18 Jul 2013 15:09:45 -0700 Subject: SH-4297 WIP interesting: viewer-interesting starts loading cached scene late dependency cleanup - removed a lot of unecessary includes --- indra/llimage/llimage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 504b7e4795..8ad6b49dd2 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -29,7 +29,7 @@ #include "lluuid.h" #include "llstring.h" -#include "llthread.h" +#include "llpointer.h" #include "lltrace.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/llimage/llimage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llimage/llimage.h') diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 08615dc8ea..bf441a008a 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,7 +165,7 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; private: U8 *mData; -- cgit v1.2.3