From 82d67f59a1be23776808ca2699702962be75d3ce Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 8 May 2022 11:14:21 -0400 Subject: [PATCH] Remove yet more debug spam to reduce binary and function bloat --- indra/llappearance/llpolymesh.cpp | 4 ++++ indra/llappearance/lltexlayer.cpp | 10 ++++++++-- indra/llappearance/lltexlayerparams.cpp | 4 +++- indra/llappearance/llwearable.cpp | 2 ++ indra/llcharacter/llkeyframemotion.cpp | 6 ++++++ indra/llcharacter/llvisualparam.cpp | 2 ++ indra/llcommon/llfasttimer.cpp | 2 ++ indra/llcommon/llsys.cpp | 2 ++ indra/llmessage/llavatarnamecache.cpp | 23 +++++++++++++++++++++-- indra/llmessage/llexperiencecache.cpp | 4 ++++ indra/llmessage/llsdmessagebuilder.cpp | 2 ++ indra/llprimitive/llprimitive.cpp | 4 ++++ indra/llrender/llrender.cpp | 4 ++++ indra/llui/llbutton.cpp | 2 ++ indra/llui/llfloater.cpp | 2 ++ indra/llui/llnotifications.cpp | 11 ++++++++--- indra/llui/llpanel.cpp | 2 ++ 17 files changed, 78 insertions(+), 8 deletions(-) diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index 8ea78197206..88df607599a 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -302,7 +302,9 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) BOOL status = FALSE; if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/ { +#ifdef SHOW_DEBUG LL_DEBUGS() << "Loading " << fileName << LL_ENDL; +#endif //---------------------------------------------------------------- // File Header (seek past it) @@ -559,10 +561,12 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) numTris++; } +#ifdef SHOW_DEBUG LL_DEBUGS() << "verts: " << numVertices << ", faces: " << numFaces << ", tris: " << numTris << LL_ENDL; +#endif //---------------------------------------------------------------- // NumSkinJoints diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index fa2e86396d0..2b091c0dc37 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1429,7 +1429,9 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC { if (!force_render && !hasMorph()) { +#ifdef SHOW_DEBUG LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL; +#endif return; } LL_RECORD_BLOCK_TIME(FTM_RENDER_MORPH_MASKS); @@ -1470,7 +1472,9 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC success &= param->render( x, y, width, height ); if (!success && !force_render) { +#ifdef SHOW_DEBUG LL_DEBUGS() << "Failed to render param " << param->getID() << " ; skipping morph mask." << LL_ENDL; +#endif return; } } @@ -1556,8 +1560,10 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC // We can get bad morph masks during login, on minimize, and occasional gl errors. // We should only be doing this when we believe something has changed with respect to the user's appearance. { - LL_DEBUGS("Avatar") << "gl alpha cache of morph mask not found, doing readback: " << getName() << LL_ENDL; - // clear out a slot if we have filled our cache +#ifdef SHOW_DEBUG + LL_DEBUGS("Avatar") << "gl alpha cache of morph mask not found, doing readback: " << getName() << LL_ENDL; +#endif + // clear out a slot if we have filled our cache S32 max_cache_entries = getTexLayerSet()->getAvatarAppearance()->isSelf() ? 4 : 1; while ((S32)mAlphaCache.size() >= max_cache_entries) { diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index de3bf87cbb1..4d6aba68ddf 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -324,8 +324,10 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) mStaticImageRaw = NULL; mStaticImageRaw = new LLImageRaw; mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight); - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = TRUE; +#ifdef SHOW_DEBUG LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL; +#endif } if (mCachedProcessedTexture) diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index db3b537d318..25e17a88716 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -173,7 +173,9 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp) { if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true)) { +#ifdef SHOW_DEBUG LL_DEBUGS("Avatar") << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL; +#endif continue; } } diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 09ed104e595..af94cce3c4d 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -247,7 +247,9 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact // request asset mAssetStatus = ASSET_FETCHED; +#ifdef SHOW_DEBUG LL_DEBUGS("Animation") << "Requesting data fetch for: " << mID << LL_ENDL; +#endif character_id = new LLUUID(mCharacter->getID()); gAssetStorage->getAssetData(mID, LLAssetType::AT_ANIMATION, @@ -346,7 +348,9 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact return STATUS_FAILURE; } +#ifdef SHOW_DEBUG LL_DEBUGS() << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << LL_ENDL; +#endif LLDataPackerBinaryBuffer dp(anim_data, anim_file_size); @@ -2104,7 +2108,9 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid, return; } +#ifdef SHOW_DEBUG LL_DEBUGS("Animation") << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL; +#endif LLDataPackerBinaryBuffer dp(buffer.get(), size); if (motionp->deserialize(dp, asset_uuid)) diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index bafb63f31b4..9afd53d1077 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -352,9 +352,11 @@ void LLVisualParam::setParamLocation(EParamLocation loc) { // no action } +#ifdef SHOW_DEBUG else { LL_DEBUGS() << "param location is already " << mParamLocation << ", not slamming to " << loc << LL_ENDL; } +#endif } diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index bd40236ee04..193ea372d65 100644 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -237,8 +237,10 @@ void BlockTimer::incrementalUpdateTimerTree() { // since ancestors have already been visited, re-parenting won't affect tree traversal //step up tree, bringing our descendants with us +#ifdef SHOW_DEBUG LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL; +#endif timerp->setParent(timerp->getParent()->getParent()); accumulator.mParent = timerp->getParent(); accumulator.mMoveUpTree = false; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 8ade219ce48..9a956fb6999 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -858,9 +858,11 @@ LLMemoryInfo& LLMemoryInfo::refresh() { mStatsMap = loadStatsMap(); +#if SHOW_DEBUG LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n"; LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT); LL_ENDL; +#endif return *this; } diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 1ba36f0ad98..3c92bcdeaee 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -133,8 +133,10 @@ LLAvatarNameCache::~LLAvatarNameCache() void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLUUID> agentIds) { +#if SHOW_DEBUG LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::getName() << " with url '" << url << "', requesting " << agentIds.size() << " Agent Ids" << LL_ENDL; +#endif // Check pointer that can be cleaned up by cleanupClass() if (!sHttpRequest || !sHttpOptions || !sHttpHeaders) @@ -152,7 +154,9 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", sHttpPolicy); LLSD results = httpAdapter.getAndSuspend(sHttpRequest, url); +#if SHOW_DEBUG LL_DEBUGS() << results << LL_ENDL; +#endif if (!results.isMap()) { @@ -282,7 +286,9 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) LLAvatarNameCache::mPendingQueue.erase(agent_id); LLAvatarName& av_name = existing->second; +#if SHOW_DEBUG LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent " << agent_id << LL_ENDL; +#endif av_name.dump(); // Reset expiry time so we don't constantly rerequest. @@ -384,12 +390,15 @@ void LLAvatarNameCache::requestNamesViaCapability() if (!url.empty()) { +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << "requested " << ids << " ids" << LL_ENDL; - - std::string coroname = + std::string coroname = +#endif LLCoros::instance().launch("LLAvatarNameCache::requestAvatarNameCache_", boost::bind(&LLAvatarNameCache::requestAvatarNameCache_, url, agent_ids)); +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << coroname << " with url '" << url << "', agent_ids.size()=" << agent_ids.size() << LL_ENDL; +#endif } } @@ -416,10 +425,12 @@ void LLAvatarNameCache::legacyNameFetch(const LLUUID& agent_id, const std::string& full_name, bool is_group) { +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << "LLAvatarNameCache agent " << agent_id << " " << "full name '" << full_name << "'" << ( is_group ? " [group]" : "" ) << LL_ENDL; +#endif // Construct an av_name record from this name. LLAvatarName av_name; @@ -444,7 +455,9 @@ void LLAvatarNameCache::requestNamesViaLegacy() // invoked below. This should never happen in practice. mPendingQueue[agent_id] = now; +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << "agent " << agent_id << LL_ENDL; +#endif gCacheName->get(agent_id, false, // legacy compatibility boost::bind(&LLAvatarNameCache::legacyNameCallback, _1, _2, _3)); @@ -589,10 +602,12 @@ void LLAvatarNameCache::eraseUnrefreshed() const LLAvatarName& av_name = it->second; if (av_name.mExpires < max_unrefreshed) { +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCacheExpired") << "LLAvatarNameCache " << it->first << " user '" << av_name.getAccountName() << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; +#endif mCache.erase(it++); expired++; } @@ -818,10 +833,12 @@ bool LLAvatarNameCache::expirationFromCacheControl(LLCore::HttpHeaders *headers, fromCacheControl = true; } } +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << ( fromCacheControl ? "expires based on cache control " : "default expiration " ) << "in " << *expires - now << " seconds" << LL_ENDL; +#endif return fromCacheControl; } @@ -863,10 +880,12 @@ bool LLAvatarNameCache::expirationFromCacheControl(const LLSD& headers, F64 *exp fromCacheControl = true; } } +#ifdef SHOW_DEBUG LL_DEBUGS("AvNameCache") << "LLAvatarNameCache " << ( fromCacheControl ? "expires based on cache control " : "default expiration " ) << "in " << *expires - now << " seconds" << LL_ENDL; +#endif return fromCacheControl; } diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 8f6e9559361..9bda805d63f 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -280,8 +280,10 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap const LLSD& row = *it; LLUUID public_key = row[EXPERIENCE_ID].asUUID(); +#if SHOW_DEBUG LL_DEBUGS("ExperienceCache") << "Received result for " << public_key << " display '" << row[LLExperienceCache::NAME].asString() << "'" << LL_ENDL; +#endif processExperience(public_key, row); } @@ -460,7 +462,9 @@ bool LLExperienceCache::fetch(const LLUUID& key, bool refresh/* = true*/) { if(!key.isNull() && !isRequestPending(key) && (refresh || mCache.find(key)==mCache.end())) { +#if SHOW_DEBUG LL_DEBUGS("ExperienceCache") << " queue request for " << EXPERIENCE_ID << " " << key << LL_ENDL; +#endif mRequestQueue.insert(key); return true; diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index ae3e00e9f37..371c503e5f3 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -385,7 +385,9 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data) void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg) { mCurrentMessage = msg; +#if SHOW_DEBUG LL_DEBUGS() << LLSDNotationStreamer(mCurrentMessage) << LL_ENDL; +#endif } const LLSD& LLSDMessageBuilder::getMessage() const diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 965991c3032..f8a0987160a 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1403,7 +1403,9 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES); U8 *cur_ptr = tec.packed_buffer; +#if SHOW_DEBUG LL_DEBUGS("TEXTUREENTRY") << "Texture Entry with buffere sized: " << tec.size << LL_ENDL; +#endif U8 *buffer_end = tec.packed_buffer + tec.size; if (!( unpack_TEField<LLUUID>(tec.image_data, tec.face_count, cur_ptr, buffer_end, MVT_LLUUID) && @@ -1537,7 +1539,9 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) U32 i; U8 *cur_ptr = packed_buffer; +#if SHOW_DEBUG LL_DEBUGS("TEXTUREENTRY") << "Texture Entry with buffer sized: " << size << LL_ENDL; +#endif U8 *buffer_end = packed_buffer + size; if (!( unpack_TEField<LLUUID>(image_data, face_count, cur_ptr, buffer_end, MVT_LLUUID) && diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 0c041f6071e..e6f85337527 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -278,6 +278,7 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) } else { +#if SHOW_DEBUG if (texture) { LL_DEBUGS() << "NULL LLTexUnit::bind GL image" << LL_ENDL; @@ -286,6 +287,7 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) { LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL; } +#endif return false; } } @@ -304,7 +306,9 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind) if(!texture) { +#if SHOW_DEBUG LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL; +#endif return false; } diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index d56e96825b7..050c21781a5 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -439,10 +439,12 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask) setFocus(TRUE); } +#if SHOW_DEBUG if (!mFunctionName.empty()) { LL_DEBUGS("UIUsage") << "calling mouse down function " << mFunctionName << LL_ENDL; } +#endif /* * ATTENTION! This call fires another mouse down callback. diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d5fb2287c6b..852c5ced14c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1586,7 +1586,9 @@ BOOL LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks) // virtual BOOL LLFloater::handleMouseUp(S32 x, S32 y, MASK mask) { +#if SHOW_DEBUG LL_DEBUGS() << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL; +#endif BOOL handled = LLPanel::handleMouseUp(x,y,mask); // Not implemented in LLPanel so this actually calls LLView #if AL_VIEWER_EVENT_RECORDER diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index f66a87cd943..b5276cbf491 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -241,9 +241,10 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica *it = it->beginMap()->second; } } - +#if SHOW_DEBUG LL_DEBUGS("Notifications") << name << LL_ENDL; LL_DEBUGS("Notifications") << ll_pretty_print_sd(mFormData) << LL_ENDL; +#endif } LLNotificationForm::LLNotificationForm(const LLSD& sd) @@ -434,9 +435,11 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par { mUniqueContext.push_back(context.value); } - + +#if SHOW_DEBUG LL_DEBUGS("Notifications") << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL; - +#endif + for (const LLNotificationTemplate::Tag& tag : p.tags) { LL_DEBUGS("Notifications") << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL; @@ -1487,7 +1490,9 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) if (found != replacements.end()) { replacement = found->second; +#if SHOW_DEBUG LL_DEBUGS("Notifications") << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL; +#endif it->second->setValue(replacement); } else diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index ca1aaaf54d6..1605221cca7 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -824,7 +824,9 @@ BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& return didPost; } +#if SHOW_DEBUG LL_DEBUGS() << "Building panel " << filename << LL_ENDL; +#endif LLUICtrlFactory::instanceFast().pushFileName(filename); { -- GitLab