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/llui/lltextbase.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 90b147cee1..966dd93888 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -50,7 +50,10 @@ class LLUrlMatch; /// includes a start/end offset from the start of the string, a /// style to render with, an optional tooltip, etc. /// -class LLTextSegment : public LLRefCount, public LLMouseHandler +class LLTextSegment +: public LLRefCount, + public LLMouseHandler, + public LLTrace::MemTrackable { public: LLTextSegment(S32 start, S32 end) : mStart(start), mEnd(end){}; -- 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/llui/lltextbase.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 966dd93888..7d791ec75a 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -94,10 +94,12 @@ public: /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const; /*virtual*/ BOOL hasMouseCapture(); - S32 getStart() const { return mStart; } - void setStart(S32 start) { mStart = start; } - S32 getEnd() const { return mEnd; } - void setEnd( S32 end ) { mEnd = end; } + S32 getStart() const { return mStart; } + void setStart(S32 start) { mStart = start; } + S32 getEnd() const { return mEnd; } + void setEnd( S32 end ) { mEnd = end; } + + static LLTrace::MemStat sMemStat; protected: S32 mStart; -- 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/llui/lltextbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 7d791ec75a..2ce15d891a 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -99,7 +99,7 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; protected: S32 mStart; -- cgit v1.2.3 From 41b4374760dd060a7f51a4a837851d5a03b7242a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 10 May 2013 17:57:12 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics renamed LLView::handleVisibilityChange to onVisibilityChange to reflect standard naming conventions for handlers vs. reactors --- indra/llui/lltextbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 2ce15d891a..bd0c8949dc 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -310,7 +310,7 @@ public: /*virtual*/ BOOL acceptsTextInput() const { return !mReadOnly; } /*virtual*/ void setColor( const LLColor4& c ); virtual void setReadOnlyColor(const LLColor4 &c); - virtual void handleVisibilityChange( BOOL new_visibility ); + virtual void onVisibilityChange( BOOL new_visibility ); /*virtual*/ void setValue(const LLSD& value ); /*virtual*/ LLTextViewModel* getViewModel() const; -- 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/llui/lltextbase.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 74dc7f9693..3e93b7de65 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -100,8 +100,6 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } - static LLTrace::MemStatHandle sMemStat; - protected: S32 mStart; S32 mEnd; -- 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/llui/lltextbase.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 3e93b7de65..74dc7f9693 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -100,6 +100,8 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } + static LLTrace::MemStatHandle sMemStat; + protected: S32 mStart; S32 mEnd; -- 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/llui/lltextbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.h') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 74dc7f9693..5b7f0a7fa4 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -100,7 +100,7 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; protected: S32 mStart; -- cgit v1.2.3