FLowLevelMemTracker::GetTagAmountForTracker with CustomProjectTag returns 0 always.
Because of FLLMTracker::FLLMThreadState::GetFrameStatTotals don't amount to about CustomTags.
Following code will fix this issue
// walk over the tags for this level for (uint32 TagIndex = 0; TagIndex < InStateCopy.TaggedAllocTags.Num(); TagIndex++) { int64 Tag = InStateCopy.TaggedAllocTags[TagIndex]; int64 Amount = InStateCopy.TaggedAllocs[TagIndex]; //--------------------- // update csv #if LLM_TRACK_PEAK_MEMORY int64 Peak = InStateCopy.TaggedAllocPeaks[TagIndex]; InCsvWriter.AddStat(Tag, Amount, Peak); #else InCsvWriter.AddStat(Tag, Amount); #endif //--------------------- // update the stats if (Tag >= (int64)LLM_TAG_COUNT) { IncMemoryStatByFName(TagToFName(Tag), Amount); } else if (Tag >= LLM_CUSTOM_TAG_START) { IncMemoryStatByFName(CustomTags[Tag - LLM_CUSTOM_TAG_START].StatName, int64(Amount)); IncMemoryStatByFName(CustomTags[Tag - LLM_CUSTOM_TAG_START].SummaryStatName, int64(Amount)); // beginning of fix code OutEnumTagAmounts[Tag] += Amount; // end of fix code } else { LLMCheck(Tag >= 0 && LLMGetTagName((ELLMTag)Tag) != nullptr); IncMemoryStatByFName(LLMGetTagStat((ELLMTag)Tag), int64(Amount)); IncMemoryStatByFName(LLMGetTagStatGroup((ELLMTag)Tag), int64(Amount)); OutEnumTagAmounts[Tag] += Amount; } }
1. open [Link Removed] with UE4.23
2. run standalone game with -LLM option
3. see debug strings on game screen
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-92848 in the post.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.23 |
Target Fix | 4.26 |
Created | May 7, 2020 |
---|---|
Resolved | May 12, 2020 |
Updated | Jul 13, 2020 |