[llvm] [MemProf] Print full context hash when reporting hinted bytes (PR #114465)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 16:07:55 PDT 2024
================
@@ -2824,13 +2842,17 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::printTotalSizes(
std::vector<uint32_t> SortedIds(ContextIds.begin(), ContextIds.end());
std::sort(SortedIds.begin(), SortedIds.end());
for (auto Id : SortedIds) {
- auto SizeI = ContextIdToTotalSize.find(Id);
- assert(SizeI != ContextIdToTotalSize.end());
auto TypeI = ContextIdToAllocationType.find(Id);
assert(TypeI != ContextIdToAllocationType.end());
- OS << getAllocTypeString((uint8_t)TypeI->second) << " context " << Id
- << " with total size " << SizeI->second << " is "
- << getAllocTypeString(Node->AllocTypes) << " after cloning\n";
+ auto CSI = ContextIdToContextSizeInfos.find(Id);
+ if (CSI != ContextIdToContextSizeInfos.end()) {
+ for (auto &Info : CSI->second) {
+ OS << getAllocTypeString((uint8_t)TypeI->second)
----------------
snehasish wrote:
Add a "MemProf hinting" or related prefix to make this easy to parse from the log later.
https://github.com/llvm/llvm-project/pull/114465
More information about the llvm-commits
mailing list