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/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 09d17b3701..43152c9025 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1157,7 +1157,7 @@ void send_agent_resume() } // Reset the FPS counter to avoid an invalid fps - LLViewerStats::getInstance()->mFPSStat.start(); + LLViewerStats::getInstance()->mFPSStat.reset(); LLAppViewer::instance()->resumeMainloopTimeout(); } -- cgit v1.2.3 From b1baf982b1bd41a150233d0a28d3601226924c65 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 30 Sep 2012 10:41:29 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages factored out lltrace::sampler into separate file added rudimentary lltrace support to llstatgraph made llstatgraph use param blocks more effectively moves initial set of stats over to lltrace removed windows.h #defines for min and max --- indra/newview/llworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 43152c9025..97079e0588 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -704,7 +704,8 @@ void LLWorld::updateNetStats() S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); + STAT_KBIT.sample(bits/1024.f); + //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); -- cgit v1.2.3 From 14b1b0b2bb6bac5bc688cc4d14c33f1b680dd3b4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 1 Oct 2012 19:39:04 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages cleaned up API samplers are now value types with copy-on-write buffers under the hood removed coupling with LLThread --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 97079e0588..1e8665e229 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -704,7 +704,7 @@ void LLWorld::updateNetStats() S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - STAT_KBIT.sample(bits/1024.f); + STAT_KBIT.add(bits/1024.f); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); -- cgit v1.2.3 From 8f5e83789254d19a1a31737b0d7515cd7e967b26 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 3 Oct 2012 19:32:59 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system SH-3403 FIX implement unit conversion LLUnit implements unit tracking and conversion added support for LLUnit to LLTrace duplicated most llstats into LLTrace equivalents --- indra/newview/llworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 1e8665e229..bf2a58f107 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -702,9 +702,10 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); + LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - STAT_KBIT.add(bits/1024.f); + LLStatViewer::KBIT.add >(bits); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); -- cgit v1.2.3 From 74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Oct 2012 19:25:56 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace --- indra/newview/llworld.cpp | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index bf2a58f107..056132c165 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -703,21 +703,26 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); - LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); + LLStatViewer::ACTUAL_IN_KBIT.add >(actual_in_bits); + LLStatViewer::ACTUAL_OUT_KBIT.add >(actual_out_bits); + //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); + //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); LLStatViewer::KBIT.add >(bits); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); - LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); - LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); - LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); - if (packets_in) - { - LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); - } - else - { - LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); - } + LLStatViewer::PACKETS_IN.add(packets_in); + LLStatViewer::PACKETS_OUT.add(packets_out); + LLStatViewer::PACKETS_LOST.add(packets_lost); + //LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); + //LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); + //LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); + //if (packets_in) + //{ + // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); + //} + //else + //{ + // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); + //} mLastPacketsIn = gMessageSystem->mPacketsIn; mLastPacketsOut = gMessageSystem->mPacketsOut; @@ -1129,6 +1134,7 @@ void send_agent_pause() } gObjectList.mWasPaused = TRUE; + LLViewerStats::instance().getRecording().stop(); } @@ -1158,8 +1164,8 @@ void send_agent_resume() gMessageSystem->sendReliable(regionp->getHost()); } - // Reset the FPS counter to avoid an invalid fps - LLViewerStats::getInstance()->mFPSStat.reset(); + // Resume data collection to ignore invalid rates + LLViewerStats::instance().getRecording().resume();//getInstance()->mFPSStat.reset(); LLAppViewer::instance()->resumeMainloopTimeout(); } -- cgit v1.2.3 From 041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 20:17:52 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system default to double precision now fixed unit conversion logic for LLUnit renamed LLTrace::Rate to LLTrace::Count and got rid of the old count as it was confusing some const correctness changes --- indra/newview/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 056132c165..9e495c46b1 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -703,11 +703,11 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLStatViewer::ACTUAL_IN_KBIT.add >(actual_in_bits); - LLStatViewer::ACTUAL_OUT_KBIT.add >(actual_out_bits); + LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); + LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - LLStatViewer::KBIT.add >(bits); + LLStatViewer::KBIT.add(bits); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); -- 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/llworld.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9e495c46b1..604741ff27 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -712,13 +712,15 @@ void LLWorld::updateNetStats() LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); LLStatViewer::PACKETS_LOST.add(packets_lost); + LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); //LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); //LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); //LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); - //if (packets_in) - //{ + if (packets_in) + { + LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); - //} + } //else //{ // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); -- 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/llworld.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9e495c46b1..0a622997f7 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -133,6 +133,9 @@ void LLWorld::destroyClass() { mEdgeWaterObjects[i] = NULL; } + + //make all visible drawbles invisible. + LLDrawable::incrementVisible(); } @@ -599,7 +602,8 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { mCulledRegionList.erase(curiter); mVisibleRegionList.push_back(regionp); @@ -622,7 +626,8 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { regionp->calculateCameraDistance(); regionp->getLand().updatePatchVisibilities(gAgent); @@ -644,8 +649,8 @@ void LLWorld::updateVisibilities() void LLWorld::updateRegions(F32 max_update_time) { LLTimer update_timer; - BOOL did_one = FALSE; - + BOOL did_one = FALSE; + // Perform idle time updates for the regions (and associated surfaces) for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) @@ -660,6 +665,13 @@ void LLWorld::updateRegions(F32 max_update_time) did_one = TRUE; } } + + mNumOfActiveCachedObjects = 0; + for (region_list_t::iterator iter = mRegionList.begin(); + iter != mRegionList.end(); ++iter) + { + mNumOfActiveCachedObjects += (*iter)->getNumOfActiveCachedObjects(); + } } void LLWorld::updateParticles() -- 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/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 604741ff27..dced5a847b 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -703,11 +703,11 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); - LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); + LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); + LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - LLStatViewer::KBIT.add(bits); + LLStatViewer::KBIT.add(bits); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); -- cgit v1.2.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/newview/llworld.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index dced5a847b..e140f3b23b 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -692,8 +692,10 @@ void LLWorld::updateNetStats() { LLViewerRegion* regionp = *iter; regionp->updateNetStats(); - bits += regionp->mBitStat.getCurrent(); - packets += llfloor( regionp->mPacketsStat.getCurrent() ); + bits += regionp->mBitsReceived; + packets += llfloor( regionp->mPacketsReceived ); + regionp->mBitsReceived = 0.f; + regionp->mPacketsReceived = 0.f; } S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn; @@ -705,26 +707,15 @@ void LLWorld::updateNetStats() LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); - //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); - //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); LLStatViewer::KBIT.add(bits); - //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); LLStatViewer::PACKETS_LOST.add(packets_lost); LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); - //LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); - //LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); - //LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); if (packets_in) { LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); - // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); } - //else - //{ - // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); - //} mLastPacketsIn = gMessageSystem->mPacketsIn; mLastPacketsOut = gMessageSystem->mPacketsOut; -- cgit v1.2.3 From 74fe126590fba03752d1d8d88dd3bb59c6900026 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 17:52:11 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system output of floater_stats is now identical to pre-lltrace system (with some tweaks) --- indra/newview/llworld.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index e140f3b23b..126dc59929 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -711,7 +711,6 @@ void LLWorld::updateNetStats() LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); LLStatViewer::PACKETS_LOST.add(packets_lost); - LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); if (packets_in) { LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); -- cgit v1.2.3 From c180fe2ae2b5d2e00149f9902717e02ed7042143 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 19 Nov 2012 22:28:12 -0700 Subject: for SH-3561: capture the frame buffer contents and compare pixel differences between frames. --- indra/newview/llworld.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 0a622997f7..aed2835e4a 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -55,7 +55,7 @@ #include "message.h" #include "pipeline.h" #include "llappviewer.h" // for do_disconnect() - +#include "llscenemonitor.h" #include #include #include @@ -136,6 +136,8 @@ void LLWorld::destroyClass() //make all visible drawbles invisible. LLDrawable::incrementVisible(); + + LLSceneMonitor::getInstance()->destroyClass(); } -- cgit v1.2.3 From e1247d631f24065a31d9668915cb8bc84f3abc7f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Dec 2012 14:36:46 -0700 Subject: fix for SH-3619: some objects are missing --- indra/newview/llworld.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index aed2835e4a..7a7d6a7b43 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -110,6 +110,7 @@ LLWorld::LLWorld() : gGL.getTexUnit(0)->bind(mDefaultWaterTexturep); mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); + LLViewerRegion::sVOCacheCullingEnabled = (BOOL)gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled"); } -- 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/llworld.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 06e2302b0b..e088f94d64 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -720,15 +720,15 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); - LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); - LLStatViewer::KBIT.add(bits); - LLStatViewer::PACKETS_IN.add(packets_in); - LLStatViewer::PACKETS_OUT.add(packets_out); - LLStatViewer::PACKETS_LOST.add(packets_lost); + add(LLStatViewer::ACTUAL_IN_KBIT, LLTrace::Bits(actual_in_bits)); + add(LLStatViewer::ACTUAL_OUT_KBIT, LLTrace::Bits(actual_out_bits)); + add(LLStatViewer::KBIT, LLTrace::Bits(bits)); + add(LLStatViewer::PACKETS_IN, packets_in); + add(LLStatViewer::PACKETS_OUT, packets_out); + add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); + sample(LLStatViewer::PACKETS_LOST_PERCENT, 100.f * ((F32)packets_lost/(F32)packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; -- cgit v1.2.3 From 1f507c3cfca0c7722ebeaf71883fbaa83988e1a9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Mar 2013 00:37:20 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics copied over scene load frame differencing changes from viewer-interesting made periodicrecording flexible enough to allow for indefinite number of periods added scene loading stats floater fixed collapsing behavior of container views --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index e088f94d64..aba9df24c9 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1172,7 +1172,7 @@ void send_agent_resume() } // Resume data collection to ignore invalid rates - LLViewerStats::instance().getRecording().resume();//getInstance()->mFPSStat.reset(); + LLViewerStats::instance().getRecording().resume(); LLAppViewer::instance()->resumeMainloopTimeout(); } -- cgit v1.2.3 From 935dce7d6b0a343cef5b13f53d6da5d0c2dc6a73 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 25 Mar 2013 00:18:06 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed some compile errors made label spacing automatic on stat bars fixed infinite values coming from stats --- indra/newview/llworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 12eea513da..9401773886 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -728,7 +728,8 @@ void LLWorld::updateNetStats() add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - sample(LLStatViewer::PACKETS_LOST_PERCENT, 100.f * ((F32)packets_lost/(F32)packets_in)); + F32 packet_loss = 100.f * ((F32)packets_lost/(F32)packets_in); + sample(LLStatViewer::PACKETS_LOST_PERCENT, packet_loss); } mLastPacketsIn = gMessageSystem->mPacketsIn; -- 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/llworld.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9401773886..a123c12811 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -123,10 +123,7 @@ void LLWorld::destroyClass() LLViewerRegion* region_to_delete = *region_it++; removeRegion(region_to_delete->getHost()); } - if(LLVOCache::hasInstance()) - { - LLVOCache::getInstance()->destroyClass() ; - } + LLVOCache::deleteSingleton(); LLViewerPartSim::getInstance()->destroyClass(); mDefaultWaterTexturep = NULL ; -- cgit v1.2.3 From 12c34dc30f0cb6270c11e100fcaceb3fa6b27e81 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 May 2013 00:53:01 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics renamed LLView::handleVisibilityChange to onVisibilityChange to reflect cleaned up scene monitor stats recording, now all trace stats dumped to csv also fixed extendablerecording, periodicrecording, etc. to properly implement start/stop/etc --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index a123c12811..c88df93119 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -135,7 +135,7 @@ void LLWorld::destroyClass() //make all visible drawbles invisible. LLDrawable::incrementVisible(); - LLSceneMonitor::getInstance()->destroyClass(); + LLSceneMonitor::deleteSingleton(); } -- cgit v1.2.3 From 30f8173e9a06f150535e8791786d908f34038c6e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 16 May 2013 17:04:57 -0600 Subject: more correct setting to enable object cache culling. --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index a123c12811..5609c22b39 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -110,7 +110,7 @@ LLWorld::LLWorld() : gGL.getTexUnit(0)->bind(mDefaultWaterTexturep); mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - LLViewerRegion::sVOCacheCullingEnabled = (BOOL)gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled"); + LLViewerRegion::sVOCacheCullingEnabled = gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled") && gSavedSettings.getBOOL("ObjectCacheEnabled"); } -- cgit v1.2.3 From e4e01ea7cce42ca5eac28ceff2b111e52dfd939b Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 28 May 2013 17:44:50 -0600 Subject: fix for SH-4214: Crash on Linux readFromCache: ASSERT (mInitialized) --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9603849b10..367abcb40e 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -123,7 +123,7 @@ void LLWorld::destroyClass() LLViewerRegion* region_to_delete = *region_it++; removeRegion(region_to_delete->getHost()); } - LLVOCache::deleteSingleton(); + LLViewerPartSim::getInstance()->destroyClass(); mDefaultWaterTexturep = NULL ; -- 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/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index b49152508c..a95adbf442 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -732,9 +732,9 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, LLTrace::Bits(actual_in_bits)); - add(LLStatViewer::ACTUAL_OUT_KBIT, LLTrace::Bits(actual_out_bits)); - add(LLStatViewer::KBIT, LLTrace::Bits(bits)); + add(LLStatViewer::ACTUAL_IN_KBIT, LLUnit(actual_in_bits)); + add(LLStatViewer::ACTUAL_OUT_KBIT, LLUnit(actual_out_bits)); + add(LLStatViewer::KBIT, LLUnit(bits)); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); -- cgit v1.2.3 From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/newview/llworld.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index a95adbf442..d45a62b223 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -711,7 +711,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - F32 bits = 0.f; + LLUnit bits = 0.f; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -729,19 +729,18 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); - S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); + LLUnit actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); + LLUnit actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, LLUnit(actual_in_bits)); - add(LLStatViewer::ACTUAL_OUT_KBIT, LLUnit(actual_out_bits)); - add(LLStatViewer::KBIT, LLUnit(bits)); + add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits); + add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits); + add(LLStatViewer::KBIT, bits); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - F32 packet_loss = 100.f * ((F32)packets_lost/(F32)packets_in); - sample(LLStatViewer::PACKETS_LOST_PERCENT, packet_loss); + sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; -- cgit v1.2.3 From 11e14cd3b0f58225a96b9b7a9839a7f030fe4045 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Jul 2013 11:05:57 -0700 Subject: SH-4299Interesting: High fps shown temporarily off scale in statistics console various fixes to lltrace start() on started recording no longer resets fixed various instances of unit forgetfullness in lltrace recording split now has gapless timing scene monitor now guarantees min sample time renamed a bunch of stats added names to debug thread view on windows --- indra/newview/llworld.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index d45a62b223..3dfe4c5e5f 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -732,9 +732,9 @@ void LLWorld::updateNetStats() LLUnit actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); LLUnit actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits); - add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits); - add(LLStatViewer::KBIT, bits); + add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); + add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); + add(LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED, bits); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); @@ -743,8 +743,8 @@ void LLWorld::updateNetStats() sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); } - mLastPacketsIn = gMessageSystem->mPacketsIn; - mLastPacketsOut = gMessageSystem->mPacketsOut; + mLastPacketsIn = gMessageSystem->mPacketsIn; + mLastPacketsOut = gMessageSystem->mPacketsOut; mLastPacketsLost = gMessageSystem->mDroppedPackets; } -- cgit v1.2.3 From 4cca9ba279f908f206fa5e32adccf1038f05cc7f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 29 Jul 2013 10:15:10 -0600 Subject: fix for SH-4293: texture console takes a while to settle down on Interesting viewer. --- indra/newview/llworld.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 3dfe4c5e5f..ea0e38824b 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -666,6 +666,11 @@ void LLWorld::updateRegions(F32 max_update_time) LLTimer update_timer; BOOL did_one = FALSE; + if(LLViewerCamera::getInstance()->isChanged()) + { + LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame(); + } + // Perform idle time updates for the regions (and associated surfaces) for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) -- 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/llworld.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 3dfe4c5e5f..9659da6bf1 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -971,12 +971,12 @@ LLViewerTexture* LLWorld::getDefaultWaterTexture() return mDefaultWaterTexturep; } -void LLWorld::setSpaceTimeUSec(const U64 space_time_usec) +void LLWorld::setSpaceTimeUSec(const LLUnitImplicit space_time_usec) { mSpaceTimeUSec = space_time_usec; } -U64 LLWorld::getSpaceTimeUSec() const +LLUnitImplicit LLWorld::getSpaceTimeUSec() const { return mSpaceTimeUSec; } @@ -1244,13 +1244,13 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi { LLViewerRegion* regionp = *iter; const LLVector3d& origin_global = regionp->getOriginGlobal(); - S32 count = regionp->mMapAvatars.count(); + S32 count = regionp->mMapAvatars.size(); for (S32 i = 0; i < count; i++) { - LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); + LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.at(i), origin_global); if(dist_vec_squared(pos_global, relative_to) <= radius_squared) { - LLUUID uuid = regionp->mMapAvatarIDs.get(i); + LLUUID uuid = regionp->mMapAvatarIDs.at(i); // if this avatar doesn't already exist in the list, add it if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end()) { -- cgit v1.2.3 From a6711a894c3c32ad24b47e36b2a52225713fd3ed Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 8 Aug 2013 16:45:55 -0600 Subject: fix for SH-4402: interesting: lower FPS with lots of objects in view --- indra/newview/llworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index bfc5077c90..df5e3d835c 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -668,8 +668,9 @@ void LLWorld::updateRegions(F32 max_update_time) if(LLViewerCamera::getInstance()->isChanged()) { - LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame(); + LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame() + 1; } + LLViewerRegion::calcNewObjectCreationThrottle(); // Perform idle time updates for the regions (and associated surfaces) for (region_list_t::iterator iter = mRegionList.begin(); -- 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/llworld.cpp | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index bfc5077c90..101f3b203b 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -141,11 +141,11 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { - llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; + LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) { - llinfos << "Region exists, removing it " << llendl; + LL_INFOS() << "Region exists, removing it " << LL_ENDL; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) @@ -156,12 +156,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) if (host != old_host) { - llwarns << "LLWorld::addRegion exists, but old host " << old_host - << " does not match new host " << host << llendl; + LL_WARNS() << "LLWorld::addRegion exists, but old host " << old_host + << " does not match new host " << host << LL_ENDL; } if (!regionp->isAlive()) { - llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl; + LL_WARNS() << "LLWorld::addRegion exists, but isn't alive" << LL_ENDL; } // Kill the old host, and then we can continue on and add the new host. We have to kill even if the host @@ -174,8 +174,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) from_region_handle(region_handle, &iindex, &jindex); S32 x = (S32)(iindex/mWidth); S32 y = (S32)(jindex/mWidth); - llinfos << "Adding new region (" << x << ":" << y << ")" << llendl; - llinfos << "Host: " << host << llendl; + LL_INFOS() << "Adding new region (" << x << ":" << y << ")" << LL_ENDL; + LL_INFOS() << "Host: " << host << LL_ENDL; LLVector3d origin_global; @@ -188,7 +188,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) getRegionWidthInMeters() ); if (!regionp) { - llerrs << "Unable to create new region!" << llendl; + LL_ERRS() << "Unable to create new region!" << LL_ENDL; } mRegionList.push_back(regionp); @@ -221,7 +221,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) neighborp = getRegionFromHandle(adj_handle); if (neighborp) { - //llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl; + //LL_INFOS() << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << LL_ENDL; regionp->connectNeighbor(neighborp, dir); } } @@ -239,7 +239,7 @@ void LLWorld::removeRegion(const LLHost &host) LLViewerRegion *regionp = getRegion(host); if (!regionp) { - llwarns << "Trying to remove region that doesn't exist!" << llendl; + LL_WARNS() << "Trying to remove region that doesn't exist!" << LL_ENDL; return; } @@ -249,21 +249,21 @@ void LLWorld::removeRegion(const LLHost &host) iter != mRegionList.end(); ++iter) { LLViewerRegion* reg = *iter; - llwarns << "RegionDump: " << reg->getName() + LL_WARNS() << "RegionDump: " << reg->getName() << " " << reg->getHost() << " " << reg->getOriginGlobal() - << llendl; + << LL_ENDL; } - llwarns << "Agent position global " << gAgent.getPositionGlobal() + LL_WARNS() << "Agent position global " << gAgent.getPositionGlobal() << " agent " << gAgent.getPositionAgent() - << llendl; + << LL_ENDL; - llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl; + LL_WARNS() << "Regions visited " << gAgent.getRegionsVisited() << LL_ENDL; - llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; + LL_WARNS() << "gFrameTimeSeconds " << gFrameTimeSeconds << LL_ENDL; - llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; + LL_WARNS() << "Disabling region " << regionp->getName() << " that agent is in!" << LL_ENDL; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected")); regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed. @@ -271,7 +271,7 @@ void LLWorld::removeRegion(const LLHost &host) } from_region_handle(regionp->getHandle(), &x, &y); - llinfos << "Removing region " << x << ":" << y << llendl; + LL_INFOS() << "Removing region " << x << ":" << y << LL_ENDL; mRegionList.remove(regionp); mActiveRegionList.remove(regionp); @@ -756,8 +756,8 @@ void LLWorld::updateNetStats() void LLWorld::printPacketsLost() { - llinfos << "Simulators:" << llendl; - llinfos << "----------" << llendl; + LL_INFOS() << "Simulators:" << LL_ENDL; + LL_INFOS() << "----------" << LL_ENDL; LLCircuitData *cdp = NULL; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -769,8 +769,8 @@ void LLWorld::printPacketsLost() { LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal(); - llinfos << regionp->getHost() << ", range: " << range.length() - << " packets lost: " << cdp->getPacketsLost() << llendl; + LL_INFOS() << regionp->getHost() << ", range: " << range.length() + << " packets lost: " << cdp->getPacketsLost() << LL_ENDL; } } } @@ -826,7 +826,7 @@ void LLWorld::updateWaterObjects() } if (mRegionList.empty()) { - llwarns << "No regions!" << llendl; + LL_WARNS() << "No regions!" << LL_ENDL; return; } @@ -1021,7 +1021,7 @@ void LLWorld::disconnectRegions() continue; } - llinfos << "Sending AgentQuitCopy to: " << regionp->getHost() << llendl; + LL_INFOS() << "Sending AgentQuitCopy to: " << regionp->getHost() << LL_ENDL; msg->newMessageFast(_PREHASH_AgentQuitCopy); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -1055,7 +1055,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) LLWorld::getInstance()->addRegion(handle, sim); // give the simulator a message it can use to get ip and port - llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl; + LL_INFOS() << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << LL_ENDL; msg->newMessageFast(_PREHASH_UseCircuitCode); msg->nextBlockFast(_PREHASH_CircuitCode); msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode()); @@ -1083,7 +1083,7 @@ public: !input["body"].has("sim-ip-and-port") || !input["body"].has("seed-capability")) { - llwarns << "invalid parameters" << llendl; + LL_WARNS() << "invalid parameters" << LL_ENDL; return; } @@ -1092,8 +1092,8 @@ public: LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim); if (!regionp) { - llwarns << "Got EstablishAgentCommunication for unknown region " - << sim << llendl; + LL_WARNS() << "Got EstablishAgentCommunication for unknown region " + << sim << LL_ENDL; return; } regionp->setSeedCapability(input["body"]["seed-capability"]); @@ -1106,7 +1106,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) { LLHost host = mesgsys->getSender(); - //llinfos << "Disabling simulator with message from " << host << llendl; + //LL_INFOS() << "Disabling simulator with message from " << host << LL_ENDL; LLWorld::getInstance()->removeRegion(host); mesgsys->disableCircuit(host); @@ -1119,8 +1119,8 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data) LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(host); if (!regionp) { - llwarns << "Got region handshake for unknown region " - << host << llendl; + LL_WARNS() << "Got region handshake for unknown region " + << host << LL_ENDL; return; } -- 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/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 7e4e80240d..38818e242b 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -717,7 +717,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - LLUnit bits = 0.f; + LLUnits::F64Bits bits; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -735,8 +735,8 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - LLUnit actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); - LLUnit actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); + LLUnit actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); + LLUnit actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); -- 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/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 38818e242b..9d727dafbe 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -717,7 +717,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - LLUnits::F64Bits bits; + F64Bits bits; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -735,8 +735,8 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - LLUnit actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); - LLUnit actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); + F64Bits actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); + F64Bits actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); -- 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/llworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9d727dafbe..2c160754a6 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -727,7 +727,7 @@ void LLWorld::updateNetStats() regionp->updateNetStats(); bits += regionp->mBitsReceived; packets += llfloor( regionp->mPacketsReceived ); - regionp->mBitsReceived = 0.f; + regionp->mBitsReceived = (F32Bits)0.f; regionp->mPacketsReceived = 0.f; } @@ -977,12 +977,12 @@ LLViewerTexture* LLWorld::getDefaultWaterTexture() return mDefaultWaterTexturep; } -void LLWorld::setSpaceTimeUSec(const LLUnitImplicit space_time_usec) +void LLWorld::setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec) { mSpaceTimeUSec = space_time_usec; } -LLUnitImplicit LLWorld::getSpaceTimeUSec() const +U64MicrosecondsImplicit LLWorld::getSpaceTimeUSec() const { return mSpaceTimeUSec; } -- 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/llworld.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 2c160754a6..6a2653bc88 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1033,11 +1033,11 @@ void LLWorld::disconnectRegions() } } -static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim"); +static LLTrace::TimeBlock FTM_ENABLE_SIMULATOR("Enable Sim"); void process_enable_simulator(LLMessageSystem *msg, void **user_data) { - LLFastTimer t(FTM_ENABLE_SIMULATOR); + LL_RECORD_BLOCK_TIME(FTM_ENABLE_SIMULATOR); // enable the appropriate circuit for this simulator and // add its values into the gSimulator structure U64 handle; -- cgit v1.2.3 From e86853db2ceb4e36e32482c88403bc1e3ee037eb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 16 Sep 2013 21:45:48 -0600 Subject: fix to load neighboring regions faster. --- indra/newview/llworld.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 6a2653bc88..9009626a03 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -663,9 +663,6 @@ void LLWorld::updateVisibilities() void LLWorld::updateRegions(F32 max_update_time) { - LLTimer update_timer; - BOOL did_one = FALSE; - if(LLViewerCamera::getInstance()->isChanged()) { LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame() + 1; @@ -676,15 +673,7 @@ void LLWorld::updateRegions(F32 max_update_time) for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) { - LLViewerRegion* regionp = *iter; - F32 max_time = max_update_time - update_timer.getElapsedTimeF32(); - if (did_one && max_time <= 0.f) - break; - max_time = llmin(max_time, max_update_time*.1f); - if (regionp->idleUpdate(max_update_time)) - { - did_one = TRUE; - } + (*iter)->idleUpdate(max_update_time); } mNumOfActiveCachedObjects = 0; -- cgit v1.2.3 From 456ff3949a28542ecd89ec23b0287b55a166529f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 25 Sep 2013 16:40:05 -0600 Subject: fix for SH-4295: Interesting: Teleporting to previous location leave some objects invisible. --- indra/newview/llworld.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9009626a03..d600abeb0a 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -684,6 +684,16 @@ void LLWorld::updateRegions(F32 max_update_time) } } +void LLWorld::clearAllVisibleObjects() +{ + for (region_list_t::iterator iter = mRegionList.begin(); + iter != mRegionList.end(); ++iter) + { + //clear all cached visible objects. + (*iter)->clearCachedVisibleObjects(); + } +} + void LLWorld::updateParticles() { LLViewerPartSim::getInstance()->updateSimulation(); -- cgit v1.2.3 From c2521e41d794c53cd6f0cedcff17ca97737debe5 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 3 Oct 2013 15:40:09 -0600 Subject: change debug setting name "ObjectCacheViewCullingEnabled" to "RequestFullRegionCache" --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index d600abeb0a..f283cdb4b8 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -110,7 +110,7 @@ LLWorld::LLWorld() : gGL.getTexUnit(0)->bind(mDefaultWaterTexturep); mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - LLViewerRegion::sVOCacheCullingEnabled = gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled") && gSavedSettings.getBOOL("ObjectCacheEnabled"); + LLViewerRegion::sVOCacheCullingEnabled = gSavedSettings.getBOOL("RequestFullRegionCache") && gSavedSettings.getBOOL("ObjectCacheEnabled"); } -- cgit v1.2.3 From 45f93f5fbbd30cef52e61f6681e8af4795e64260 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 10:19:52 -0700 Subject: add cached object count stat --- indra/newview/llworld.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index f283cdb4b8..e4e0a745ce 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -661,6 +661,8 @@ void LLWorld::updateVisibilities() LLViewerCamera::getInstance()->setFar(cur_far_clip); } +static LLTrace::SampleStatHandle<> sNumActiveCachedObjects("numactivecachedobjects", "Number of objects loaded from cache"); + void LLWorld::updateRegions(F32 max_update_time) { if(LLViewerCamera::getInstance()->isChanged()) @@ -682,6 +684,7 @@ void LLWorld::updateRegions(F32 max_update_time) { mNumOfActiveCachedObjects += (*iter)->getNumOfActiveCachedObjects(); } + sample(sNumActiveCachedObjects, mNumOfActiveCachedObjects); } void LLWorld::clearAllVisibleObjects() -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/newview/llworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index e4e0a745ce..1940bdcccc 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1035,7 +1035,7 @@ void LLWorld::disconnectRegions() } } -static LLTrace::TimeBlock FTM_ENABLE_SIMULATOR("Enable Sim"); +static LLTrace::BlockTimerStatHandle FTM_ENABLE_SIMULATOR("Enable Sim"); void process_enable_simulator(LLMessageSystem *msg, void **user_data) { -- cgit v1.2.3 From 0ce7008521b776451c0ce38299fa87c9e64c63cd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 4 Nov 2013 16:41:06 -0700 Subject: fix for SH-4596: Interesting: MacBook Pro has worse framerate than on Release --- indra/newview/llworld.cpp | 48 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 1940bdcccc..d67e4ca71d 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -665,25 +665,61 @@ static LLTrace::SampleStatHandle<> sNumActiveCachedObjects("numactivecachedobjec void LLWorld::updateRegions(F32 max_update_time) { + LLTimer update_timer; + mNumOfActiveCachedObjects = 0; + if(LLViewerCamera::getInstance()->isChanged()) { LLViewerRegion::sLastCameraUpdated = LLViewerOctreeEntryData::getCurrentFrame() + 1; } LLViewerRegion::calcNewObjectCreationThrottle(); + if(LLViewerRegion::isNewObjectCreationThrottleDisabled()) + { + max_update_time = llmax(max_update_time, 1.0f); //seconds, loosen the time throttle. + } - // Perform idle time updates for the regions (and associated surfaces) + F32 max_time = llmin((F32)(max_update_time - update_timer.getElapsedTimeF32()), max_update_time * 0.25f); + //update the self avatar region + LLViewerRegion* self_regionp = gAgent.getRegion(); + if(self_regionp) + { + self_regionp->idleUpdate(max_time); + } + + //sort regions by its mLastUpdate + //smaller mLastUpdate first to make sure every region has chance to get updated. + LLViewerRegion::region_priority_list_t region_list; for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) { - (*iter)->idleUpdate(max_update_time); + LLViewerRegion* regionp = *iter; + if(regionp != self_regionp) + { + region_list.insert(regionp); + } + mNumOfActiveCachedObjects += regionp->getNumOfActiveCachedObjects(); } - mNumOfActiveCachedObjects = 0; - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) + // Perform idle time updates for the regions (and associated surfaces) + for (LLViewerRegion::region_priority_list_t::iterator iter = region_list.begin(); + iter != region_list.end(); ++iter) { - mNumOfActiveCachedObjects += (*iter)->getNumOfActiveCachedObjects(); + if(max_time > 0.f) + { + max_time = llmin((F32)(max_update_time - update_timer.getElapsedTimeF32()), max_update_time * 0.25f); + } + + if(max_time > 0.f) + { + (*iter)->idleUpdate(max_time); + } + else + { + //perform some necessary but very light updates. + (*iter)->lightIdleUpdate(); + } } + sample(sNumActiveCachedObjects, mNumOfActiveCachedObjects); } -- cgit v1.2.3