[PATCH] D108437: [CSSPGO] split context string III - llvm-profgen changes
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 13:17:03 PDT 2021
hoy marked 2 inline comments as done.
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.h:124
// Offset to context location map. Used to expand the context.
- std::unordered_map<uint64_t, FrameLocationStack> Offset2LocStackMap;
+ std::unordered_map<uint64_t, SampleContextStorageType> Offset2LocStackMap;
// An array of offsets of all instructions sorted in increasing order. The
----------------
wmi wrote:
> I guess Offset2LocStackMap will serve as the immutable storage of all SampleContextStorageType. Is there way to enforce its immutability?
Yes, it should be immutable once after symbolization is done. The checking of that may not be as easy as the CSName table in the reader. On the other hand, a std::unordered_map operation should not invalidate the values unless it removes or replaces the value. It should just work as other fields like the `FuncStartAddrMap` above. What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108437/new/
https://reviews.llvm.org/D108437
More information about the llvm-commits
mailing list