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/newview/llviewerobject.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 97cf0a4850..14ea8ded38 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -107,7 +107,11 @@ struct PotentialReturnableObject //============================================================================ -class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate +class LLViewerObject +: public LLPrimitive, + public LLRefCount, + public LLGLUpdate, + public LLTrace::MemTrackable { protected: ~LLViewerObject(); // use unref() -- cgit v1.2.3 From 4e22f3e3ef15e24d7e9e0ad156e60d4cd1b2d5c9 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Dec 2012 23:16:50 -0700 Subject: fix for SH-3624: Object deletion does not work --- indra/newview/llviewerobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 02b4f84785..74b86600d4 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -132,6 +132,7 @@ public: BOOL isDead() const {return mDead;} BOOL isOrphaned() const { return mOrphaned; } BOOL isParticleSource() const; + void EnableToCacheTree(bool enabled); virtual LLVOAvatar* asAvatar(); -- 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/newview/llviewerobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 14ea8ded38..153f44601c 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -670,8 +670,6 @@ protected: void deleteParticleSource(); void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id); -public: - private: void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string void deleteTEImages(); // correctly deletes list of images @@ -750,6 +748,8 @@ protected: static S32 sAxisArrowLength; + static LLTrace::MemStat sMemStat; + // These two caches are only correct for non-parented objects right now! mutable LLVector3 mPositionRegion; mutable LLVector3 mPositionAgent; -- cgit v1.2.3 From 4ebd4b3616d9d69e9b6deb73aa1f1e16f5673225 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 4 Jan 2013 14:09:02 -0800 Subject: SH-3468 WIP add memory tracking base class further compile error fixes --- indra/newview/llviewerobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 153f44601c..bdff88f8ca 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -634,7 +634,8 @@ public: LLPointer mText; LLPointer mIcon; - static BOOL sUseSharedDrawables; + static BOOL sUseSharedDrawables; + static LLTrace::MemStat sMemStat; protected: // delete an item in the inventory, but don't tell the @@ -748,7 +749,6 @@ protected: static S32 sAxisArrowLength; - static LLTrace::MemStat sMemStat; // These two caches are only correct for non-parented objects right now! mutable LLVector3 mPositionRegion; -- cgit v1.2.3 From bd60fdbe44d9f996686d31cf48a3f2ca664dd301 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 28 Feb 2013 22:49:05 -0700 Subject: for SH-3824: interesting: Ensure viewer can handle object updates from entire region gracefully --- indra/newview/llviewerobject.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 20254bfe02..2db30f1e24 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -70,6 +70,7 @@ class LLViewerRegion; class LLViewerObjectMedia; class LLVOInventoryListener; class LLVOAvatar; +class LLDataPackerBinaryBuffer; typedef enum e_object_update_type { @@ -162,6 +163,7 @@ public: INVALID_UPDATE = 0x80000000 }; + static U32 extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector3& pos, LLVector3& scale, LLQuaternion& rot); virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, void **user_data, U32 block_num, @@ -539,6 +541,13 @@ public: friend class LLViewerObjectList; friend class LLViewerMediaList; +public: + static void unpackVector3(LLDataPackerBinaryBuffer* dp, LLVector3& value, std::string name); + static void unpackUUID(LLDataPackerBinaryBuffer* dp, LLUUID& value, std::string name); + static void unpackU32(LLDataPackerBinaryBuffer* dp, U32& value, std::string name); + static void unpackU8(LLDataPackerBinaryBuffer* dp, U8& value, std::string name); + static U32 unpackParentID(LLDataPackerBinaryBuffer* dp, U32& parent_id); + public: //counter-translation void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ; @@ -562,6 +571,8 @@ private: // Motion prediction between updates void interpolateLinearMotion(const F64 & time, const F32 & dt); + static void initObjectDataMap(); + public: // // Viewer-side only types - use the LL_PCODE_APP mask. @@ -610,6 +621,7 @@ private: // Grabbed from UPDATE_FLAGS U32 mFlags; + static std::map sObjectDataMap; public: // Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties U8 mPhysicsShapeType; -- 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/newview/llviewerobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 20254bfe02..aa30d1c790 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -636,7 +636,7 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the -- cgit v1.2.3 From 50b32cf2bdb93fad14770aa0f6b92fb3815ebdf0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 7 Mar 2013 23:54:11 -0700 Subject: for SH-3937: interesting: implement the new cache probe logic --- indra/newview/llviewerobject.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 2db30f1e24..eda9692e19 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -137,8 +137,7 @@ public: BOOL isDead() const {return mDead;} BOOL isOrphaned() const { return mOrphaned; } BOOL isParticleSource() const; - void EnableToCacheTree(bool enabled); - + virtual LLVOAvatar* asAvatar(); static void initVOClasses(); -- cgit v1.2.3 From 27bb36b1e796add58f319555bf761e417f7957ef Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 11 Mar 2013 21:23:15 -0600 Subject: for SH-3979: interesting: can not edit objects with new object cache code --- indra/newview/llviewerobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index eda9692e19..a1f63faf5b 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -511,6 +511,7 @@ public: virtual void updateRegion(LLViewerRegion *regionp); void updateFlags(BOOL physics_changed = FALSE); + void loadFlags(U32 flags); //load flags from cache or from message BOOL setFlags(U32 flag, BOOL state); BOOL setFlagsWithoutUpdate(U32 flag, BOOL state); void setPhysicsShapeType(U8 type); -- cgit v1.2.3 From 6b81b8629e67d82a7620e48781ded73b6e6126ea Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 5 May 2013 17:45:35 -0700 Subject: Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies --- indra/newview/llviewerobject.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 942eb67823..536106fb1e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -30,8 +30,7 @@ #include #include "llassetstorage.h" -#include "lldarrayptr.h" -#include "llhudicon.h" +//#include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" #include "llprimitive.h" @@ -43,34 +42,30 @@ #include "v3math.h" #include "llvertexbuffer.h" #include "llbbox.h" -#include "llbbox.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; class LLAudioSourceVO; -class LLDataPacker; class LLColor4; -class LLFrameTimer; +class LLDataPacker; +class LLDataPackerBinaryBuffer; class LLDrawable; -class LLHost; class LLHUDText; -class LLWorld; -class LLNameValue; -class LLNetMap; +class LLHost; class LLMessageSystem; +class LLNameValue; class LLPartSysData; -class LLPrimitive; class LLPipeline; class LLTextureEntry; -class LLViewerTexture; +class LLVOAvatar; +class LLVOInventoryListener; class LLViewerInventoryItem; class LLViewerObject; +class LLViewerObjectMedia; class LLViewerPartSourceScript; class LLViewerRegion; -class LLViewerObjectMedia; -class LLVOInventoryListener; -class LLVOAvatar; -class LLDataPackerBinaryBuffer; +class LLViewerTexture; +class LLWorld; typedef enum e_object_update_type { @@ -645,7 +640,7 @@ public: // TODO: Make all this stuff private. JC LLPointer mText; - LLPointer mIcon; + LLPointer mIcon; static BOOL sUseSharedDrawables; static LLTrace::MemStatHandle sMemStat; -- 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/newview/llviewerobject.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 5556a4c7d3..63da7152b3 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -661,7 +661,6 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the -- 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/newview/llviewerobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 63da7152b3..5556a4c7d3 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -661,6 +661,7 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; + static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the -- cgit v1.2.3 From 25937040de9a787c221aae7f178f43827c799028 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Aug 2013 12:38:12 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms converted many values over to units system in effort to track down source of 0 ping --- indra/newview/llviewerobject.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 5556a4c7d3..3943709049 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -780,7 +780,7 @@ protected: mutable LLVector3 mPositionRegion; mutable LLVector3 mPositionAgent; - static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64) value; } + static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; } static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64) value; } static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } @@ -789,8 +789,8 @@ protected: private: static S32 sNumObjects; - static F64 sPhaseOutUpdateInterpolationTime; // For motion interpolation - static F64 sMaxUpdateInterpolationTime; // For motion interpolation + static F64Seconds sPhaseOutUpdateInterpolationTime; // For motion interpolation + static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation static BOOL sVelocityInterpolate; static BOOL sPingInterpolate; -- cgit v1.2.3 From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits --- indra/newview/llviewerobject.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 3943709049..24dff45ae8 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -580,7 +580,7 @@ private: U32 checkMediaURL(const std::string &media_url); // Motion prediction between updates - void interpolateLinearMotion(const F64 & time, const F32 & dt); + void interpolateLinearMotion(const F64SecondsImplicit & time, const F32SecondsImplicit & dt); static void initObjectDataMap(); @@ -707,8 +707,8 @@ protected: child_list_t mChildList; - F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation - F64 mLastMessageUpdateSecs; // Last update from a message from the simulator + F64Seconds mLastInterpUpdateSecs; // Last update for purposes of interpolation + F64Seconds mLastMessageUpdateSecs; // Last update from a message from the simulator TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator // extra data sent from the sim...currently only used for tree species info @@ -781,7 +781,7 @@ protected: mutable LLVector3 mPositionAgent; static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; } - static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64) value; } + static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; } static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } static void setPingInterpolate(BOOL value) { sPingInterpolate = value; } -- 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/newview/llviewerobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 24dff45ae8..e3972ccae8 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -661,7 +661,7 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the -- 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/newview/llviewerobject.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index e3972ccae8..56518cca69 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -661,7 +661,6 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - //static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the -- cgit v1.2.3