diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llcommon/lltrace.h | 22 | ||||
| -rwxr-xr-x | indra/llimage/llimage.cpp | 1 | ||||
| -rwxr-xr-x | indra/llimage/llimage.h | 2 | ||||
| -rwxr-xr-x | indra/llimage/tests/llimageworker_test.cpp | 3 | ||||
| -rwxr-xr-x | indra/llkdu/tests/llimagej2ckdu_test.cpp | 2 | ||||
| -rwxr-xr-x | indra/llui/lltextbase.cpp | 2 | ||||
| -rwxr-xr-x | indra/llui/lltextbase.h | 2 | ||||
| -rwxr-xr-x | indra/llui/llview.cpp | 1 | ||||
| -rwxr-xr-x | indra/llui/llview.h | 1 | ||||
| -rwxr-xr-x | indra/llui/llviewmodel.cpp | 2 | ||||
| -rwxr-xr-x | indra/llui/llviewmodel.h | 2 | ||||
| -rwxr-xr-x | indra/newview/lldrawable.cpp | 1 | ||||
| -rwxr-xr-x | indra/newview/lldrawable.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llvocache.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llvocache.h | 2 | 
17 files changed, 35 insertions, 14 deletions
| diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 1cde450dc2..e2c4b63276 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -336,7 +336,7 @@ public:  	void* operator new(size_t size)   	{ -		MemStatAccumulator* accumulator = mem_trackable_t::sMemStat.getPrimaryAccumulator(); +		MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  		if (accumulator)  		{  			accumulator->mSize.sample(accumulator->mSize.getLastValue() + (F64)size); @@ -348,7 +348,7 @@ public:  	void operator delete(void* ptr, size_t size)  	{ -		MemStatAccumulator* accumulator = mem_trackable_t::sMemStat.getPrimaryAccumulator(); +		MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  		if (accumulator)  		{  			accumulator->mSize.sample(accumulator->mSize.getLastValue() - (F64)size); @@ -360,7 +360,7 @@ public:  	void *operator new [](size_t size)  	{ -		MemStatAccumulator* accumulator = mem_trackable_t::sMemStat.getPrimaryAccumulator(); +		MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  		if (accumulator)  		{  			accumulator->mSize.sample(accumulator->mSize.getLastValue() + (F64)size); @@ -372,7 +372,7 @@ public:  	void operator delete[](void* ptr, size_t size)  	{ -		MemStatAccumulator* accumulator = mem_trackable_t::sMemStat.getPrimaryAccumulator(); +		MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  		if (accumulator)  		{  			accumulator->mSize.sample(accumulator->mSize.getLastValue() - (F64)size); @@ -438,15 +438,13 @@ public:  private:  	size_t mMemFootprint; -	static MemStatHandle sMemStat; -  	template<typename TRACKED, typename TRACKED_IS_TRACKER = void>  	struct TrackMemImpl  	{  		static void claim(mem_trackable_t& tracker, const TRACKED& tracked)  		{ -			MemStatAccumulator* accumulator = sMemStat.getPrimaryAccumulator(); +			MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  			if (accumulator)  			{  				size_t footprint = MemFootprint<TRACKED>::measure(tracked); @@ -457,7 +455,7 @@ private:  		static void disclaim(mem_trackable_t& tracker, const TRACKED& tracked)  		{ -			MemStatAccumulator* accumulator = sMemStat.getPrimaryAccumulator(); +			MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  			if (accumulator)  			{  				size_t footprint = MemFootprint<TRACKED>::measure(tracked); @@ -472,7 +470,7 @@ private:  	{  		static void claim(mem_trackable_t& tracker, TRACKED& tracked)  		{ -			MemStatAccumulator* accumulator = sMemStat.getPrimaryAccumulator(); +			MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  			if (accumulator)  			{  				accumulator->mChildSize.sample(accumulator->mChildSize.getLastValue() + (F64)MemFootprint<TRACKED>::measure(tracked)); @@ -481,7 +479,7 @@ private:  		static void disclaim(mem_trackable_t& tracker, TRACKED& tracked)  		{ -			MemStatAccumulator* accumulator = sMemStat.getPrimaryAccumulator(); +			MemStatAccumulator* accumulator = DERIVED::sMemStat.getPrimaryAccumulator();  			if (accumulator)  			{  				accumulator->mChildSize.sample(accumulator->mChildSize.getLastValue() - (F64)MemFootprint<TRACKED>::measure(tracked)); @@ -490,9 +488,5 @@ private:  	};  }; -template<typename DERIVED, size_t ALIGNMENT> -MemStatHandle MemTrackable<DERIVED, ALIGNMENT>::sMemStat(typeid(DERIVED).name()); - -  }  #endif // LL_LLTRACE_H diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 395e6a6cc5..8477e62db7 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -50,6 +50,7 @@ LLMutex* LLImage::sMutex = NULL;  bool LLImage::sUseNewByteRange = false;  S32  LLImage::sMinimalReverseByteRangePercent = 75;  LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ; +LLTrace::MemStatHandle	LLImageBase::sMemStat("LLImage");  //static  void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent) 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; diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 7d7e9e036e..aba7883974 100755 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -44,6 +44,9 @@  // * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)  // * A simulator for a class can be implemented here. Please comment and document thoroughly. +LLTrace::MemStatHandle	LLImageBase::sMemStat("LLImage"); + +  LLImageBase::LLImageBase()   : mData(NULL),  mDataSize(0), diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index 0e73f33e04..14fbf344ab 100755 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -44,6 +44,8 @@  // End Stubbing  // -------------------------------------------------------------------------------------------  // Stub the LL Image Classes +LLTrace::MemStatHandle	LLImageBase::sMemStat("LLImage"); +  LLImageRaw::LLImageRaw() { }  LLImageRaw::~LLImageRaw() { }  U8* LLImageRaw::allocateData(S32 ) { return NULL; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 9845941778..7243931dbb 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -48,6 +48,8 @@ const F32	CURSOR_FLASH_DELAY = 1.0f;  // in seconds  const S32	CURSOR_THICKNESS = 2;  const F32	TRIPLE_CLICK_INTERVAL = 0.3f;	// delay between double and triple click. +LLTrace::MemStatHandle	LLTextSegment::sMemStat("LLTextSegment"); +  LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num)   :	mDocIndexStart(index_start),   	mDocIndexEnd(index_end), 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; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index b2805a32e8..daeb4d7939 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -69,6 +69,7 @@ LLView* LLView::sPreviewClickedElement = NULL;  BOOL	LLView::sDrawPreviewHighlights = FALSE;  S32		LLView::sLastLeftXML = S32_MIN;  S32		LLView::sLastBottomXML = S32_MIN; +LLTrace::MemStatHandle	LLView::sMemStat("LLView");  std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack;  LLView::DrilldownFunc LLView::sDrilldown = 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 diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index dff0dcb2fd..901260bec8 100755 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,6 +35,8 @@  // external library headers  // other Linden headers +LLTrace::MemStatHandle	LLViewModel::sMemStat("LLViewModel"); +  ///  LLViewModel::LLViewModel()   : mDirty(false) diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index a2ca20c739..2c016d2560 100755 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -83,6 +83,8 @@ public:  	//       void setDirty() { mDirty = true; } +	static LLTrace::MemStatHandle sMemStat; +  protected:      LLSD mValue;      bool mDirty; diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 3dddf4b554..628f7f7bfb 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -59,6 +59,7 @@ const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f;  static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");  extern bool gShiftFrame; +LLTrace::MemStatHandle	LLDrawable::sMemStat("LLDrawable");  //////////////////////// diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 4558597d89..b7c5aeb5a8 100755 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -293,6 +293,7 @@ public:  	F32				mDistanceWRTCamera;  	static F32 sCurPixelAngle; //current pixels per radian +	static LLTrace::MemStatHandle sMemStat;  private:  	typedef std::vector<LLFace*> face_list_t; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c633e3acdd..4e514ddfd1 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -114,6 +114,8 @@ BOOL		LLViewerObject::sMapDebug = TRUE;  LLColor4	LLViewerObject::sEditSelectColor(	1.0f, 1.f, 0.f, 0.3f);	// Edit OK  LLColor4	LLViewerObject::sNoEditSelectColor(	1.0f, 0.f, 0.f, 0.3f);	// Can't edit  S32			LLViewerObject::sAxisArrowLength(50); +LLTrace::MemStatHandle	LLViewerObject::sMemStat("LLViewerObject"); +  BOOL		LLViewerObject::sPulseEnabled(FALSE);  BOOL		LLViewerObject::sUseSharedDrawables(FALSE); // TRUE 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<class LLHUDIcon> mIcon;  	static			BOOL		sUseSharedDrawables; +	static	LLTrace::MemStatHandle	sMemStat;  protected:  	// delete an item in the inventory, but don't tell the diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index d87eb5d3db..60d78890b5 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -34,6 +34,8 @@  #include "llviewerregion.h"  #include "pipeline.h" +LLTrace::MemStatHandle	LLVOCachePartition::sMemStat("LLVOCachePartition"); +  BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes)   {  	return apr_file->read(src, n_bytes) == n_bytes ; diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index c43c42908f..c42374e154 100755 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -157,6 +157,8 @@ public:  	/*virtual*/ S32 cull(LLCamera &camera);  	void addOccluders(LLviewerOctreeGroup* gp); +	static	LLTrace::MemStatHandle	sMemStat; +  private:	  	void processOccluders(LLCamera* camera, const LLVector3* region_agent); | 
