BUILDFIX: reverted changes that attempted to automate mem track
stat definition as they don't work on gcc/clangmeow-7.2.2
parent
04bdc8ba83
commit
8208a40412
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ public:
|
|||
static void destroyPrivatePool() ;
|
||||
static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;}
|
||||
|
||||
static LLTrace::MemStatHandle sMemStat;
|
||||
|
||||
private:
|
||||
U8 *mData;
|
||||
S32 mDataSize;
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -675,6 +675,7 @@ public:
|
|||
static S32 sLastLeftXML;
|
||||
static S32 sLastBottomXML;
|
||||
static BOOL sForceReshape;
|
||||
static LLTrace::MemStatHandle sMemStat;
|
||||
};
|
||||
|
||||
namespace LLInitParam
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
// external library headers
|
||||
// other Linden headers
|
||||
|
||||
LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel");
|
||||
|
||||
///
|
||||
LLViewModel::LLViewModel()
|
||||
: mDirty(false)
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ public:
|
|||
//
|
||||
void setDirty() { mDirty = true; }
|
||||
|
||||
static LLTrace::MemStatHandle sMemStat;
|
||||
|
||||
protected:
|
||||
LLSD mValue;
|
||||
bool mDirty;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
||||
////////////////////////
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue