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.meow-7.2.2
parent
2719c6b3da
commit
2e7ed2a172
|
|
@ -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;
|
||||
// </FS:Beq>
|
||||
return ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue