From bd065bf93a1d5e9ab06e22b890a2f936e7ea5d69 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 31 Oct 2020 16:38:40 -0400
Subject: [PATCH] More spammy debug messages incuring mutex locks

---
 indra/llappearance/llavatarappearance.cpp | 2 ++
 indra/llappearance/llavatarjointmesh.cpp  | 2 ++
 indra/llmath/llvolume.cpp                 | 2 ++
 indra/llplugin/llpluginprocessparent.cpp  | 3 ++-
 indra/newview/llpanelland.cpp             | 2 ++
 indra/newview/llviewerassetstorage.cpp    | 4 ++++
 indra/newview/llviewerregion.cpp          | 2 ++
 indra/newview/llvoavatar.cpp              | 4 ++++
 8 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 2c1578c05db..312438e03fc 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -558,7 +558,9 @@ void LLAvatarAppearance::computeBodySize()
 	{
 		mBodySize = new_body_size;
 
+#if SHOW_DEBUG
         compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
+#endif
 	}
 }
 
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index f6d56a8c65c..d92727af85d 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -53,7 +53,9 @@ LLAvatarJoint *getBaseSkeletonAncestor(LLAvatarJoint* joint)
     LLJoint *ancestor = joint->getParent();
     while (ancestor->getParent() && (ancestor->getSupport() != LLJoint::SUPPORT_BASE))
     {
+#if SHOW_DEBUG
         LL_DEBUGS("Avatar") << "skipping non-base ancestor " << ancestor->getName() << LL_ENDL;
+#endif
         ancestor = ancestor->getParent();
     }
     return (LLAvatarJoint*) ancestor;
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 7fcfeab7a58..dc6dfef7b9c 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2370,7 +2370,9 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
 	U32 uzip_result = LLUZipHelper::unzip_llsd(mdl, is, size);
 	if (uzip_result != LLUZipHelper::ZR_OK)
 	{
+#if SHOW_DEBUG
 		LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD with code " << uzip_result << " , will probably fetch from sim again." << LL_ENDL;
+#endif
 		return false;
 	}
 	
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 0dc7eeead72..e68cbcc78a1 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -1033,8 +1033,9 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
 			mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
 
 			mCPUUsage = message.getValueReal("cpu_usage");
-
+#if SHOW_DEBUG
 			LL_DEBUGS("Plugin") << "cpu usage reported as " << mCPUUsage << LL_ENDL;
+#endif
 			
 		}
 		else if(message_name == "shm_add_response")
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index dc45aa2e3f6..be7ae70e973 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -200,7 +200,9 @@ void LLPanelLandInfo::refresh()
 		}
 		else
 		{
+#if SHOW_DEBUG
 			LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
+#endif
 			mButtonJoinLand->setEnabled(FALSE);
 		}
 
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 1fde077fa42..d0beead9134 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -532,13 +532,17 @@ void LLViewerAssetStorage::assetRequestCoro(
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
     if (!status)
     {
+#if SHOW_DEBUG
         LL_DEBUGS("ViewerAsset") << "request failed, status " << status.toTerseString() << LL_ENDL;
+#endif
         result_code = LL_ERR_ASSET_REQUEST_FAILED;
         ext_status = LLExtStat::NONE;
     }
     else
     {
+#if SHOW_DEBUG
         LL_DEBUGS("ViewerAsset") << "request succeeded, url " << url << LL_ENDL;
+#endif
 
         const LLSD::Binary &raw = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary();
 
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 7fcd56eef24..9ae17900f0c 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2686,7 +2686,9 @@ void LLViewerRegion::requestCacheMisses()
 		msg->addU8Fast(_PREHASH_CacheMissType, (*iter).mType);
 		msg->addU32Fast(_PREHASH_ID, (*iter).mID);
 
+#if SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << "Requesting cache missed object " << (*iter).mID << LL_ENDL;
+#endif
         
 		blocks++;
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9a0405dcabc..8caedc7706c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2367,7 +2367,9 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
 			LL_WARNS() << "unable to determine URL for te " << te << " uuid " << uuid << LL_ENDL;
 			return NULL;
 		}
+#if SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL;
+#endif
 		result = LLViewerTextureManager::getFetchedTextureFromUrl(
 			url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
 		if (result->isMissingAsset())
@@ -9222,7 +9224,9 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
 		// Got an update for some other avatar
 		// Ignore updates for self, because we have a more authoritative value in the preferences.
 		setHoverOffset(contents.mHoverOffset);
+#if SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "setting hover to " << contents.mHoverOffset[2] << LL_ENDL;
+#endif
 	}
 
 	if (!contents.mHoverOffsetWasSet && !isSelf())
-- 
GitLab