From 2719c6b3da9906acd08eedbfda8b3de75ec84c10 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Sun, 14 Jul 2024 03:08:48 +0200 Subject: [PATCH 1/3] FIRE-33958 - possible fix for stuck notices when (re)opening local chat while notices are on-screen --- indra/newview/fsfloaternearbychat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index bc72dedca8..ed9c1b89cb 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -405,7 +405,7 @@ void FSFloaterNearbyChat::openFloater(const LLSD& key) void FSFloaterNearbyChat::removeScreenChat() { - LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID); + LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLNotificationsUI::NEARBY_CHAT_CHANNEL_UUID); if (chat_channel) { chat_channel->removeToastsFromChannel(); From 2e7ed2a172d3d79f45d4d5e32b465d40206685d7 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 16 Jul 2024 01:11:21 +0100 Subject: [PATCH 2/3] Add some debug logging for memory tracking Two setting MemoryInfo will enable the logging of updates to the memory stats. TextureMemory will enable the logging of whether low RAM is skewing the bias. --- indra/llcommon/llmemory.cpp | 7 +++++++ indra/newview/llviewertexture.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 69c9ba38f1..c296112a4c 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -191,6 +191,13 @@ void LLMemory::updateMemoryInfo() { sAvailPhysicalMemInKB = U32Kilobytes(0); } + // debug log the memory info + LL_DEBUGS("MemoryInfo") << "Memory Info:" + << "Heap: " << sMaxHeapSizeInKB << "; " // Heap + << "Free: " << sAvailPhysicalMemInKB << "; " // Free + << "FS Use: " << sAllocatedMemInKB << "; " // In use by this instance right now + << "FS Max poss: " << sMaxPhysicalMemInKB << "; " // How much we could have (In use now + free) + << LL_ENDL; // return ; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 377153a099..2ed465af87 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -607,6 +607,7 @@ void LLViewerTexture::updateClass() if (isSystemMemoryForTextureLow()) { // System RAM is low -> ramp up discard bias over time to free memory + LL_DEBUGS("TextureMemory") << "System memory is low, use more aggressive discard bias." << LL_ENDL; if (sEvaluationTimer.getElapsedTimeF32() > GPU_MEMORY_CHECK_WAIT_TIME) { sDesiredDiscardBias += llmax(.1f, over_pct); // add at least 10% over-percentage @@ -615,6 +616,7 @@ void LLViewerTexture::updateClass() } else { + LL_DEBUGS("TextureMemory") << "System memory is plentiful, act normally." << LL_ENDL; sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct); if (sDesiredDiscardBias > 1.f) From a447221d66d67bc2be3d8b62942e5a4dcf869b6f Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 16 Jul 2024 01:19:02 +0100 Subject: [PATCH 3/3] Updated memory calculation logic for MacOS The available physical memory computation now includes the inactive_count along with the free_count. --- indra/llcommon/llmemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index c296112a4c..ced68a5212 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -154,7 +154,7 @@ void LLMemory::updateMemoryInfo() // align MemInfo across platforms // sAvailPhysicalMemInKB = U32Bytes(vmstat.free_count * page_size); // sMaxPhysicalMemInKB = LLMemoryInfo::getHardwareMemSize(); - avail_phys = U32Bytes(vmstat.free_count * page_size); + avail_phys = U32Bytes( (vmstat.free_count + vmstat.inactive_count) * page_size); sMaxHeapSizeInKB = LLMemoryInfo::getHardwareMemSize(); // }