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/llview.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 1c35349510..29ee2125f9 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -101,7 +101,8 @@ class LLView : public LLMouseHandler, // handles mouse events public LLFocusableElement, // handles keyboard events public LLMortician, // lazy deletion - public LLHandleProvider // passes out weak references to self + public LLHandleProvider, // passes out weak references to self + public LLTrace::MemTrackable // track memory usage { public: struct Follows : public LLInitParam::ChoiceBlock -- 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/llview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 29ee2125f9..256f86c00d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -673,6 +673,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; + static LLTrace::MemStat sMemStat; }; class LLCompareByTabOrder -- 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/llview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 256f86c00d..e18cfff8e5 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -673,7 +673,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; }; class LLCompareByTabOrder -- cgit v1.2.3 From 7b4d27ecbcb5ac702459be97cbf6b81354850658 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 14 Mar 2013 19:36:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics collapsed Orientation enums to all use LLView::EOrientation added ability to display stat bar horizontally --- indra/llui/llview.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index e18cfff8e5..88813da3c6 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -105,6 +105,9 @@ class LLView public LLTrace::MemTrackable // track memory usage { public: + + enum EOrientation { HORIZONTAL, VERTICAL, ORIENTATION_COUNT }; + struct Follows : public LLInitParam::ChoiceBlock { Alternative string; @@ -676,6 +679,16 @@ public: static LLTrace::MemStatHandle sMemStat; }; +namespace LLInitParam +{ +template<> +struct TypeValues : public LLInitParam::TypeValuesHelper +{ + static void declareValues(); +}; +} + + class LLCompareByTabOrder { public: -- 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/llview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 88813da3c6..224d75bb85 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -308,7 +308,7 @@ public: virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); - virtual void handleVisibilityChange ( BOOL new_visibility ); + virtual void onVisibilityChange ( BOOL new_visibility ); void pushVisible(BOOL visible) { mLastVisible = mVisible; setVisible(visible); } void popVisible() { setVisible(mLastVisible); } -- 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/llview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 0568fa889a..62bfb54566 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -675,7 +675,6 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - static LLTrace::MemStatHandle sMemStat; }; namespace LLInitParam -- 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/llview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 62bfb54566..0568fa889a 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -675,6 +675,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; + static LLTrace::MemStatHandle sMemStat; }; namespace LLInitParam -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llui/llview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 0568fa889a..cd23ce7df1 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -42,7 +42,6 @@ #include "llui.h" #include "lluistring.h" #include "llviewquery.h" -#include "stdenums.h" #include "lluistring.h" #include "llcursortypes.h" #include "lluictrlfactory.h" @@ -67,6 +66,7 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE; const U32 GL_NAME_UI_RESERVED = 2; + // maintains render state during traversal of UI tree class LLViewDrawContext { -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/llui/llview.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index cd23ce7df1..e224233c3c 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -709,7 +709,7 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // did we find *something* with that name? if (child) { - llwarns << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << llendl; + LL_WARNS() << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << LL_ENDL; } result = getDefaultWidget(name); if (!result) @@ -721,11 +721,11 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // *NOTE: You cannot call mFoo = getChild("bar") // in a floater or panel constructor. The widgets will not // be ready. Instead, put it in postBuild(). - llwarns << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << llendl; + LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; } else { - llwarns << "Failed to create dummy " << typeid(T).name() << llendl; + LL_WARNS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; return NULL; } -- 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/llview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index e224233c3c..f6799d8cd9 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -675,7 +675,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; }; namespace LLInitParam -- cgit v1.2.3 From 053d97db1b283ca2548dc1f64756ddfc5166158f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 25 Sep 2013 19:12:35 -0700 Subject: better memory usage for LLTrace (tighter packing of recording arrays) removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway) improved MemTrackable API, better separation of shadow and footprint added memory usage stats to floater_stats.xml --- indra/llui/llview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index f6799d8cd9..3a0dfb5f42 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -675,7 +675,6 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - //static LLTrace::MemStatHandle sMemStat; }; namespace LLInitParam -- cgit v1.2.3 From 12f0f8cb72f789e21b01b45063dcc5f1f5292087 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 1 Oct 2013 13:46:43 -0700 Subject: changed over to manual naming of MemTrackable stats changed claimMem and disclaimMem behavior to not pass through argument added more mem tracking stats to floater_stats --- indra/llui/llview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 3a0dfb5f42..665aad70cf 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -167,7 +167,7 @@ protected: private: // widgets in general are not copyable - LLView(const LLView& other) {}; + LLView(const LLView& other); public: //#if LL_DEBUG static BOOL sIsDrawing; -- cgit v1.2.3 From a10eb7b240675b009430f6718d410399d8045581 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Nov 2013 19:30:38 -0800 Subject: further fix of inventory keyboard focus and tab order calculations --- indra/llui/llview.h | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 665aad70cf..7861c8f729 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -200,12 +200,9 @@ public: typedef child_list_t::reverse_iterator child_list_reverse_iter_t; typedef child_list_t::const_reverse_iterator child_list_const_reverse_iter_t; - typedef std::vector ctrl_list_t; - - typedef std::pair tab_order_t; - typedef std::pair tab_order_pair_t; + typedef std::pair tab_order_pair_t; // this structure primarily sorts by the tab group, secondarily by the insertion ordinal (lastly by the value of the pointer) - typedef std::map child_tab_order_t; + typedef std::map child_tab_order_t; typedef child_tab_order_t::iterator child_tab_order_iter_t; typedef child_tab_order_t::const_iterator child_tab_order_const_iter_t; typedef child_tab_order_t::reverse_iterator child_tab_order_reverse_iter_t; @@ -251,8 +248,6 @@ public: void sendChildToFront(LLView* child); void sendChildToBack(LLView* child); - void moveChildToFrontOfTabGroup(LLUICtrl* child); - void moveChildToBackOfTabGroup(LLUICtrl* child); virtual bool addChild(LLView* view, S32 tab_group = 0); @@ -264,9 +259,7 @@ public: virtual BOOL postBuild() { return TRUE; } - const child_tab_order_t& getCtrlOrder() const { return mCtrlOrder; } - ctrl_list_t getCtrlList() const; - ctrl_list_t getCtrlListSorted() const; + const child_tab_order_t& getTabOrder() const { return mTabOrder; } void setDefaultTabGroup(S32 d) { mDefaultTabGroup = d; } S32 getDefaultTabGroup() const { return mDefaultTabGroup; } @@ -500,9 +493,9 @@ public: static BOOL focusPrev(LLView::child_list_t & result); // returns query for iterating over controls in tab order - static const LLCtrlQuery & getTabOrderQuery(); + static const LLViewQuery & getTabOrderQuery(); // return query for iterating over focus roots in tab order - static const LLCtrlQuery & getFocusRootsQuery(); + static const LLViewQuery & getFocusRootsQuery(); static LLWindow* getWindow(void) { return LLUI::sWindow; } @@ -596,7 +589,7 @@ private: U32 mReshapeFlags; - child_tab_order_t mCtrlOrder; + child_tab_order_t mTabOrder; S32 mDefaultTabGroup; S32 mLastTabGroup; @@ -613,8 +606,6 @@ private: BOOL mLastVisible; - S32 mNextInsertionOrdinal; - bool mInDraw; static LLWindow* sWindow; // All root views must know about their window. @@ -686,19 +677,6 @@ struct TypeValues : public LLInitParam::TypeValuesHelper T* LLView::getChild(const std::string& name, BOOL recurse) const { LLView* child = findChildView(name, recurse); -- cgit v1.2.3