[llvm] [memprof] Omit the key/data lengths for the frame table (PR #89711)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 07:58:35 PDT 2024
================
@@ -470,17 +470,19 @@ static uint64_t writeMemProfRecords(
// Serialize MemProfFrameData. Return FrameTableOffset.
static uint64_t writeMemProfFrames(
ProfOStream &OS,
- llvm::MapVector<memprof::FrameId, memprof::Frame> &MemProfFrameData) {
+ llvm::MapVector<memprof::FrameId, memprof::Frame> &MemProfFrameData,
+ memprof::IndexedVersion Version) {
+ memprof::FrameWriterTrait FrameWriter(Version);
OnDiskChainedHashTableGenerator<memprof::FrameWriterTrait>
FrameTableGenerator;
for (auto &[FrameId, Frame] : MemProfFrameData) {
// Insert the key (frame id) and value (frame contents).
- FrameTableGenerator.insert(FrameId, Frame);
+ FrameTableGenerator.insert(FrameId, Frame, FrameWriter);
----------------
teresajohnson wrote:
Are there changes needed in this patch to the insert() and Emit() methods of OnDiskChainedHashTableGenerator to take the writer trait?
https://github.com/llvm/llvm-project/pull/89711
More information about the llvm-commits
mailing list