diff options
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 77 | ||||
-rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.h | 2 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 33 |
4 files changed, 84 insertions, 39 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 384e83a2a0..4c6940500e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9400,6 +9400,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>RenderAutoMuteLogging</key> + <map> + <key>Comment</key> + <string>Show extra information in viewer logs about avatar rendering costs</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>RenderAutoMuteVisibilityRank</key> <map> <key>Comment</key> diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 04a79f7d4c..54144677f4 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -37,15 +37,13 @@ #include "llcharacter.h" #include "llhttpclient.h" #include "lltimer.h" +#include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llvoavatar.h" #include "llworld.h" -// Use this for debugging -//#define LL_AVATAR_RENDER_INFO_LOG_SPAM - static const std::string KEY_AGENTS = "agents"; // map static const std::string KEY_WEIGHT = "weight"; // integer static const std::string KEY_GEOMETRY = "geometry"; // integer @@ -94,9 +92,10 @@ public: LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); if (regionp) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Result for avatar weights request for region " << regionp->getName() << ":" << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << "Result for avatar weights request for region " << regionp->getName() << ":" << llendl; + } if (content.isMap()) { @@ -116,10 +115,11 @@ public: agent_info_map.isMap()) { // Extract the data for this avatar - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << " Agent " << target_agent_id - << ": " << agent_info_map << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << " Agent " << target_agent_id + << ": " << agent_info_map << llendl; + } if (agent_info_map.has(KEY_WEIGHT)) { @@ -194,10 +194,11 @@ public: LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); if (regionp) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Result for avatar weights POST for region " << regionp->getName() - << ": " << content << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << "Result for avatar weights POST for region " << regionp->getName() + << ": " << content << llendl; + } if (content.isMap()) { @@ -231,12 +232,13 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio std::string url = regionp->getCapability("AvatarRenderInfo"); if (!url.empty()) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Sending avatar render info to region " - << regionp->getName() - << " from " << url - << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Sending avatar render info to region " + << regionp->getName() + << " from " << url + << llendl; + } // Build the render info to POST to the region LLSD report = LLSD::emptyMap(); @@ -271,10 +273,11 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio agents[avatar->getID().asString()] = info; } - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Sending avatar render info for " << avatar->getID() - << ": " << info << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Sending avatar render info for " << avatar->getID() + << ": " << info << llendl; + } } iter++; } @@ -297,12 +300,13 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi std::string url = regionp->getCapability("AvatarRenderInfo"); if (!url.empty()) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Requesting avatar render info for region " - << regionp->getName() - << " from " << url - << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Requesting avatar render info for region " + << regionp->getName() + << " from " << url + << llendl; + } // First send a request to get the latest data LLHTTPClient::get(url, new LLAvatarRenderInfoGetResponder(regionp->getHandle())); @@ -351,10 +355,17 @@ void LLAvatarRenderInfoAccountant::idle() // are returned for a new LLViewerRegion, and is the earliest time to get render info void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer() { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Viewer has new region capabilities" << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Viewer has new region capabilities" << llendl; + } sRenderInfoReportTimer.resetWithExpiry(0.f); } +// static +bool LLAvatarRenderInfoAccountant::logRenderInfo() +{ + static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging"); + return render_mute_logging_enabled; +} diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h index 5b4a4d3db2..97dd9f0ad3 100644 --- a/indra/newview/llavatarrenderinfoaccountant.h +++ b/indra/newview/llavatarrenderinfoaccountant.h @@ -46,6 +46,8 @@ public: static void idle(); + static bool logRenderInfo(); + private: // Send data updates about once per minute, only need per-frame resolution static LLFrameTimer sRenderInfoReportTimer; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 809f85a7b5..5154809240 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -288,7 +288,14 @@ public: ~LLMeshSkinInfoResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -313,7 +320,14 @@ public: ~LLMeshDecompositionResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshDecomposition(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -338,7 +352,14 @@ public: ~LLMeshPhysicsShapeResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -1984,7 +2005,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } @@ -2047,7 +2068,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } @@ -2111,7 +2132,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } |