From b3e9c46c94dad0c81a5adcb9152521b5368c66a7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Aug 2012 22:50:56 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages further cleanup of LLStat removed llfloaterlagmeter --- indra/newview/llvoavatarself.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6ef9bdd238..93573ed52e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2140,8 +2140,8 @@ LLSD LLVOAvatarSelf::metricsData() result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32(); result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); - result["phases"] = getPhases().dumpPhases(); - result["startup"] = LLStartUp::getPhases().dumpPhases(); + result["phases"] = getPhases().asLLSD(); + result["startup"] = LLStartUp::getPhases().asLLSD(); return result; } -- cgit v1.2.3 From 0027ee8a7ddc47da656fb542ea4a97c00ca2683b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 6 Sep 2012 14:38:23 -0700 Subject: another build fix --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ed84e8103d..fd892db3d3 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2138,7 +2138,7 @@ LLSD LLVOAvatarSelf::metricsData() result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32(); result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); - result["startup"] = LLStartUp::getPhases().dumpPhases(); + result["startup"] = LLStartUp::getPhases().asLLSD(); return result; } -- cgit v1.2.3 From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/newview/llvoavatarself.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fd892db3d3..3e8b07b6dc 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -911,13 +911,14 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { ++mRegionCrossingCount; F64 delta = (F64)mRegionCrossingTimer.getElapsedTimeF32(); - F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG); - F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount; - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_AVG, delta_avg); - - F64 max = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_MAX); - max = llmax(delta, max); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max); + //F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG); + //F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount; + LLStatViewer::REGION_CROSSING_TIME.sample(delta); + //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_AVG, delta_avg); + // + //F64 max = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_MAX); + //max = llmax(delta, max); + //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max); // Diagnostics llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl; @@ -2587,7 +2588,8 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); + LLStatViewer::TEX_REBAKES.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } } } @@ -2632,7 +2634,8 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } invalidateComposite(layer_set, TRUE); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); + LLStatViewer::TEX_REBAKES.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else { -- cgit v1.2.3 From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/llvoavatarself.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fd892db3d3..a11653b77d 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -808,8 +808,10 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys, updateMeshTextures(); // unpack the texture UUIDs to the texture slots - retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num); - + if(mesgsys != NULL) + { + retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num); + } // need to trigger a few operations to get the avatar to use the new bakes for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { -- cgit v1.2.3 From e6ca5471a2a816a24888ae1b38332531b22b7254 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 00:06:22 -0700 Subject: SH-3275 Update viewer metrics system to be more flexible put template parameter back in LLUnit units added free function operators for mathematical manipulation of unit values converted texture memory tracking to units --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 3e8b07b6dc..9f0921ff59 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2790,7 +2790,7 @@ void LLVOAvatarSelf::deleteScratchTextures() sScratchTexNames.deleteAllData(); sScratchTexLastBindTime.deleteAllData(); - LLImageGL::sGlobalTextureMemoryInBytes -= sScratchTexBytes; + LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; sScratchTexBytes = 0; } } -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/llvoavatarself.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 9f0921ff59..7c20e8eae7 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -910,18 +910,11 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - F64 delta = (F64)mRegionCrossingTimer.getElapsedTimeF32(); - //F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG); - //F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount; + LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); LLStatViewer::REGION_CROSSING_TIME.sample(delta); - //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_AVG, delta_avg); - // - //F64 max = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_MAX); - //max = llmax(delta, max); - //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max); // Diagnostics - llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl; + llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; } if (regionp) { @@ -2589,7 +2582,6 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; LLStatViewer::TEX_REBAKES.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } } } @@ -2635,7 +2627,6 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) invalidateComposite(layer_set, TRUE); LLStatViewer::TEX_REBAKES.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else { -- 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/llvoavatarself.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index cd033c84bf..4ecb7f2fc7 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -913,7 +913,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { ++mRegionCrossingCount; LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); - LLStatViewer::REGION_CROSSING_TIME.sample(delta); + sample(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; @@ -2583,7 +2583,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; - LLStatViewer::TEX_REBAKES.add(1); + add(LLStatViewer::TEX_REBAKES, 1); } } } @@ -2628,7 +2628,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } invalidateComposite(layer_set, TRUE); - LLStatViewer::TEX_REBAKES.add(1); + add(LLStatViewer::TEX_REBAKES, 1); } else { -- 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/llvoavatarself.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4275552117..69f998f0f3 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -43,6 +43,7 @@ #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" +#include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam -- cgit v1.2.3 From 9ae76d12157641033431381959ef4f798a119b8d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 May 2013 17:00:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed copy construction behavior of Recordings to not zero out data split measurement into event and sample, with sample representing a continuous function --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 69f998f0f3..b6f48b4a66 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -914,7 +914,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { ++mRegionCrossingCount; LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); - sample(LLStatViewer::REGION_CROSSING_TIME, delta); + record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; -- cgit v1.2.3 From fe3cfb30d504155850ddf3752d2f55e6311990d6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 22 Jun 2013 00:34:25 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed LLTrace unit typedefs --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7d99b11360..67da311c5a 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -900,7 +900,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); + LLUnit delta = mRegionCrossingTimer.getElapsedTimeF32(); record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics -- 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/newview/llvoavatarself.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 67da311c5a..117169678e 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -143,8 +143,7 @@ struct LocalTextureData // Static Data //----------------------------------------------------------------------------- S32 LLVOAvatarSelf::sScratchTexBytes = 0; -LLMap< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames; -LLMap< LLGLenum, F32*> LLVOAvatarSelf::sScratchTexLastBindTime; +std::map< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames; /********************************************************************************* @@ -2543,11 +2542,11 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const asset_id_matches); BOOL can_grab = FALSE; - lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl; - if (items.count()) + lldebugs << "item count for asset " << texture_id << ": " << items.size() << llendl; + if (items.size()) { // search for full permissions version - for (S32 i = 0; i < items.count(); i++) + for (S32 i = 0; i < items.size(); i++) { LLViewerInventoryItem* itemp = items[i]; if (itemp->getIsFullPerm()) @@ -3060,11 +3059,11 @@ BOOL LLVOAvatarSelf::needsRenderBeam() // static void LLVOAvatarSelf::deleteScratchTextures() { - for( LLGLuint* namep = sScratchTexNames.getFirstData(); - namep; - namep = sScratchTexNames.getNextData() ) + for(std::map< LLGLenum, LLGLuint*>::iterator it = sScratchTexNames.begin(), end_it = sScratchTexNames.end(); + it != end_it; + ++it) { - LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)namep ); + LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)it->second ); stop_glerror(); } @@ -3072,8 +3071,7 @@ void LLVOAvatarSelf::deleteScratchTextures() { lldebugs << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << llendl; - sScratchTexNames.deleteAllData(); - sScratchTexLastBindTime.deleteAllData(); + delete_and_clear(sScratchTexNames); LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; sScratchTexBytes = 0; } -- 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/newview/llvoavatarself.cpp | 108 +++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 117169678e..12b9744b24 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -165,7 +165,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mMotionController.mIsSelf = TRUE; - lldebugs << "Marking avatar as self " << id << llendl; + LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL; } // Called periodically for diagnostics, return true when done. @@ -206,7 +206,7 @@ void LLVOAvatarSelf::initInstance() // adds attachment points to mScreen among other things LLVOAvatar::initInstance(); - llinfos << "Self avatar object created. Starting timer." << llendl; + LL_INFOS() << "Self avatar object created. Starting timer." << LL_ENDL; mDebugSelfLoadTimer.reset(); // clear all times to -1 for debugging for (U32 i =0; i < LLAvatarAppearanceDefines::TEX_NUM_INDICES; ++i) @@ -227,7 +227,7 @@ void LLVOAvatarSelf::initInstance() status &= buildMenus(); if (!status) { - llerrs << "Unable to load user's avatar" << llendl; + LL_ERRS() << "Unable to load user's avatar" << LL_ENDL; return; } @@ -271,7 +271,7 @@ BOOL LLVOAvatarSelf::loadAvatarSelf() // avatar_skeleton.xml if (!buildSkeletonSelf(sAvatarSkeletonInfo)) { - llwarns << "avatar file: buildSkeleton() failed" << llendl; + LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL; return FALSE; } @@ -889,9 +889,9 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) // Diagnostic info //LLVector3d pos_from_new_region = getPositionGlobal(); - //llinfos << "pos_from_old_region is " << global_pos_from_old_region + //LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region // << " while pos_from_new_region is " << pos_from_new_region - // << llendl; + // << LL_ENDL; } if (!regionp || (regionp->getHandle() != mLastRegionHandle)) @@ -903,7 +903,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics - llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; + LL_INFOS() << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << LL_ENDL; } if (regionp) { @@ -987,7 +987,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() // virtual void LLVOAvatarSelf::restoreMeshData() { - //llinfos << "Restoring" << llendl; + //LL_INFOS() << "Restoring" << LL_ENDL; mMeshValid = TRUE; updateJointLODs(); updateAttachmentVisibility(gAgentCamera.getCameraMode()); @@ -1227,7 +1227,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // Update COF contents, don't trigger appearance update. if (!isValid()) { - llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl; + LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL; } else { @@ -1601,7 +1601,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r { return; } - // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << llendl; + // LL_INFOS() << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << LL_ENDL; layer_set->requestUpdate(); layer_set->invalidateMorphMasks(); @@ -1754,7 +1754,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te { if (type >= TEX_NUM_INDICES) { - llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl; + LL_ERRS() << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << LL_ENDL; return; } LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getInstance()->getTEWearableType(type); @@ -1767,7 +1767,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te local_tex_obj = getLocalTextureObject(type,index); if (!local_tex_obj) { - llerrs << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << llendl; + LL_ERRS() << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << LL_ENDL; return; } @@ -1829,7 +1829,7 @@ void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type // virtual void LLVOAvatarSelf::dumpLocalTextures() const { - llinfos << "Local Textures:" << llendl; + LL_INFOS() << "Local Textures:" << LL_ENDL; /* ETextureIndex baked_equiv[] = { TEX_UPPER_BAKED, @@ -1853,22 +1853,22 @@ void LLVOAvatarSelf::dumpLocalTextures() const #if LL_RELEASE_FOR_DOWNLOAD // End users don't get to trivially see avatar texture IDs, makes textures // easier to steal. JC - llinfos << "LocTex " << name << ": Baked " << llendl; + LL_INFOS() << "LocTex " << name << ": Baked " << LL_ENDL; #else - llinfos << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << llendl; + LL_INFOS() << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << LL_ENDL; #endif } else if (local_tex_obj && local_tex_obj->getImage() != NULL) { if (local_tex_obj->getImage()->getID() == IMG_DEFAULT_AVATAR) { - llinfos << "LocTex " << name << ": None" << llendl; + LL_INFOS() << "LocTex " << name << ": None" << LL_ENDL; } else { const LLViewerFetchedTexture* image = dynamic_cast( local_tex_obj->getImage() ); - llinfos << "LocTex " << name << ": " + LL_INFOS() << "LocTex " << name << ": " << "Discard " << image->getDiscardLevel() << ", " << "(" << image->getWidth() << ", " << image->getHeight() << ") " #if !LL_RELEASE_FOR_DOWNLOAD @@ -1877,12 +1877,12 @@ void LLVOAvatarSelf::dumpLocalTextures() const << image->getID() << " " #endif << "Priority: " << image->getDecodePriority() - << llendl; + << LL_ENDL; } } else { - llinfos << "LocTex " << name << ": No LLViewerTexture" << llendl; + LL_INFOS() << "LocTex " << name << ": No LLViewerTexture" << LL_ENDL; } } } @@ -1938,7 +1938,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() { S32 gl_bytes = 0; gAgentAvatarp->getLocalTextureByteCount(&gl_bytes); - llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl; + LL_INFOS() << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << LL_ENDL; } BOOL LLVOAvatarSelf::getIsCloud() const @@ -1962,12 +1962,12 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded due to missing one or more required body parts: " + LL_INFOS() << "Self is clouded due to missing one or more required body parts: " << (shape_count ? "" : "SHAPE ") << (hair_count ? "" : "HAIR ") << (eye_count ? "" : "EYES ") << (skin_count ? "" : "SKIN ") - << llendl; + << LL_ENDL; } return TRUE; } @@ -1976,7 +1976,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because of no hair texture" << llendl; + LL_INFOS() << "Self is clouded because of no hair texture" << LL_ENDL; } return TRUE; } @@ -1988,7 +1988,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because lower textures not baked" << llendl; + LL_INFOS() << "Self is clouded because lower textures not baked" << LL_ENDL; } return TRUE; } @@ -1998,7 +1998,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because upper textures not baked" << llendl; + LL_INFOS() << "Self is clouded because upper textures not baked" << LL_ENDL; } return TRUE; } @@ -2018,14 +2018,14 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because texture at index " << i - << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + LL_INFOS() << "Self is clouded because texture at index " << i + << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << LL_ENDL; } return TRUE; } } - lldebugs << "Avatar de-clouded" << llendl; + LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL; } return FALSE; } @@ -2146,7 +2146,7 @@ void LLVOAvatarSelf::dumpAllTextures() const if (!layerset_buffer) continue; vd_text += verboseDebugDumpLocalTextureDataInfo(layerset); } - LL_DEBUGS("Avatar") << vd_text << llendl; + LL_DEBUGS("Avatar") << vd_text << LL_ENDL; } const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const @@ -2433,7 +2433,7 @@ public: /* virtual */ void result(const LLSD& content) { - LL_DEBUGS("Avatar") << "status OK" << llendl; + LL_DEBUGS("Avatar") << "status OK" << LL_ENDL; } // Error @@ -2442,7 +2442,7 @@ public: if (isAgentAvatarValid()) { LL_DEBUGS("Avatar") << "failed, will rebake [status:" - << status << "]: " << content << llendl; + << status << "]: " << content << LL_ENDL; forceAppearanceUpdate(); } } @@ -2501,7 +2501,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const // Check if the texture hasn't been baked yet. if (!isTextureDefined(tex_index, 0)) { - lldebugs << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; + LL_DEBUGS() << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << LL_ENDL; return FALSE; } @@ -2520,7 +2520,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const const ETextureIndex t_index = (*iter); LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getTEWearableType(t_index); U32 count = gAgentWearables.getWearableCount(wearable_type); - lldebugs << "Checking index " << (U32) t_index << " count: " << count << llendl; + LL_DEBUGS() << "Checking index " << (U32) t_index << " count: " << count << LL_ENDL; for (U32 wearable_index = 0; wearable_index < count; ++wearable_index) { @@ -2542,7 +2542,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const asset_id_matches); BOOL can_grab = FALSE; - lldebugs << "item count for asset " << texture_id << ": " << items.size() << llendl; + LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL; if (items.size()) { // search for full permissions version @@ -2657,16 +2657,16 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) /* switch(te) case TEX_HEAD_BAKED: - llinfos << "New baked texture: HEAD" << llendl; */ + LL_INFOS() << "New baked texture: HEAD" << LL_ENDL; */ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(te); if (texture_dict->mIsBakedTexture) { debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish. - llinfos << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <mName << " UUID: " << uuid <getBakedTextures().begin(); @@ -2765,7 +2765,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const if (!layerset) continue; const LLViewerTexLayerSetBuffer *layerset_buffer = layerset->getViewerComposite(); if (!layerset_buffer) continue; - LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << llendl; + LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << LL_ENDL; } dumpAllTextures(); @@ -2805,11 +2805,11 @@ void LLVOAvatarSelf::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid { if (mInitialBakeIDs[i] == uuid) { - llinfos << "baked texture correctly loaded at login! " << i << llendl; + LL_INFOS() << "baked texture correctly loaded at login! " << i << LL_ENDL; } else { - llwarns << "baked texture does not match id loaded at login!" << i << llendl; + LL_WARNS() << "baked texture does not match id loaded at login!" << i << LL_ENDL; } mInitialBakeIDs[i] = LLUUID::null; } @@ -2845,7 +2845,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) LLViewerTexLayerSet* layer_set = gAgentAvatarp->getLayerSet(index); if (layer_set) { - llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; + LL_INFOS() << "TAT: rebake - matched entry " << (S32)index << LL_ENDL; gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; add(LLStatViewer::TEX_REBAKES, 1); @@ -2869,7 +2869,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) { - llinfos << "TAT: forced full rebake. " << llendl; + LL_INFOS() << "TAT: forced full rebake. " << LL_ENDL; for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -2888,7 +2888,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } else { - llwarns << "TAT: NO LAYER SET FOR " << (S32)baked_index << llendl; + LL_WARNS() << "TAT: NO LAYER SET FOR " << (S32)baked_index << LL_ENDL; } } @@ -3069,7 +3069,7 @@ void LLVOAvatarSelf::deleteScratchTextures() if( sScratchTexBytes ) { - lldebugs << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << llendl; + LL_DEBUGS() << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; delete_and_clear(sScratchTexNames); LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; @@ -3080,7 +3080,7 @@ void LLVOAvatarSelf::deleteScratchTextures() // static void LLVOAvatarSelf::dumpScratchTextureByteCount() { - llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl; + LL_INFOS() << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; } void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile) -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 12b9744b24..66206fe53e 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -899,7 +899,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - LLUnit delta = mRegionCrossingTimer.getElapsedTimeF32(); + LLUnits::F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics -- cgit v1.2.3 From 9f7bfa1c3710856cd2b0a0a8a429d6c45b0fcd09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Aug 2013 00:02:23 -0700 Subject: moved unit types out of LLUnits namespace, since they are prefixed --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 66206fe53e..db6d2d6fe9 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -899,7 +899,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - LLUnits::F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); + F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics -- 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/llvoavatarself.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index db6d2d6fe9..e36bed3e5b 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -142,7 +142,7 @@ struct LocalTextureData //----------------------------------------------------------------------------- // Static Data //----------------------------------------------------------------------------- -S32 LLVOAvatarSelf::sScratchTexBytes = 0; +S32Bytes LLVOAvatarSelf::sScratchTexBytes(0); std::map< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames; @@ -3067,13 +3067,13 @@ void LLVOAvatarSelf::deleteScratchTextures() stop_glerror(); } - if( sScratchTexBytes ) + if( sScratchTexBytes.value() ) { - LL_DEBUGS() << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; + LL_DEBUGS() << "Clearing Scratch Textures " << (S32Kilobytes)sScratchTexBytes << LL_ENDL; delete_and_clear(sScratchTexNames); LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; - sScratchTexBytes = 0; + sScratchTexBytes = S32Bytes(0); } } -- cgit v1.2.3