@@ -274,7 +274,7 @@ void InstrProfWriter::addRecord(StringRef Name, uint64_t Hash,
274274
275275void InstrProfWriter::addMemProfRecord (
276276 const Function::GUID Id, const memprof::IndexedMemProfRecord &Record) {
277- auto [Iter, Inserted] = MemProfData.RecordData .insert ({Id, Record});
277+ auto [Iter, Inserted] = MemProfData.Records .insert ({Id, Record});
278278 // If we inserted a new record then we are done.
279279 if (Inserted) {
280280 return ;
@@ -286,7 +286,7 @@ void InstrProfWriter::addMemProfRecord(
286286bool InstrProfWriter::addMemProfFrame (const memprof::FrameId Id,
287287 const memprof::Frame &Frame,
288288 function_ref<void (Error)> Warn) {
289- auto [Iter, Inserted] = MemProfData.FrameData .insert ({Id, Frame});
289+ auto [Iter, Inserted] = MemProfData.Frames .insert ({Id, Frame});
290290 // If a mapping already exists for the current frame id and it does not
291291 // match the new mapping provided then reset the existing contents and bail
292292 // out. We don't support the merging of memprof data whose Frame -> Id
@@ -303,7 +303,7 @@ bool InstrProfWriter::addMemProfCallStack(
303303 const memprof::CallStackId CSId,
304304 const llvm::SmallVector<memprof::FrameId> &CallStack,
305305 function_ref<void (Error)> Warn) {
306- auto [Iter, Inserted] = MemProfData.CallStackData .insert ({CSId, CallStack});
306+ auto [Iter, Inserted] = MemProfData.CallStacks .insert ({CSId, CallStack});
307307 // If a mapping already exists for the current call stack id and it does not
308308 // match the new mapping provided then reset the existing contents and bail
309309 // out. We don't support the merging of memprof data whose CallStack -> Id
@@ -390,22 +390,22 @@ void InstrProfWriter::mergeRecordsFromWriter(InstrProfWriter &&IPW,
390390 addTemporalProfileTraces (IPW.TemporalProfTraces ,
391391 IPW.TemporalProfTraceStreamSize );
392392
393- MemProfData.FrameData .reserve (IPW.MemProfData .FrameData .size ());
394- for (auto &[FrameId, Frame] : IPW.MemProfData .FrameData ) {
393+ MemProfData.Frames .reserve (IPW.MemProfData .Frames .size ());
394+ for (auto &[FrameId, Frame] : IPW.MemProfData .Frames ) {
395395 // If we weren't able to add the frame mappings then it doesn't make sense
396396 // to try to merge the records from this profile.
397397 if (!addMemProfFrame (FrameId, Frame, Warn))
398398 return ;
399399 }
400400
401- MemProfData.CallStackData .reserve (IPW.MemProfData .CallStackData .size ());
402- for (auto &[CSId, CallStack] : IPW.MemProfData .CallStackData ) {
401+ MemProfData.CallStacks .reserve (IPW.MemProfData .CallStacks .size ());
402+ for (auto &[CSId, CallStack] : IPW.MemProfData .CallStacks ) {
403403 if (!addMemProfCallStack (CSId, CallStack, Warn))
404404 return ;
405405 }
406406
407- MemProfData.RecordData .reserve (IPW.MemProfData .RecordData .size ());
408- for (auto &[GUID, Record] : IPW.MemProfData .RecordData ) {
407+ MemProfData.Records .reserve (IPW.MemProfData .Records .size ());
408+ for (auto &[GUID, Record] : IPW.MemProfData .Records ) {
409409 addMemProfRecord (GUID, Record);
410410 }
411411}
@@ -605,11 +605,11 @@ static Error writeMemProfV0(ProfOStream &OS,
605605 auto Schema = memprof::getFullSchema ();
606606 writeMemProfSchema (OS, Schema);
607607
608- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
609- &Schema, memprof::Version0);
608+ uint64_t RecordTableOffset =
609+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version0);
610610
611611 uint64_t FramePayloadOffset = OS.tell ();
612- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
612+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
613613
614614 uint64_t Header[] = {RecordTableOffset, FramePayloadOffset, FrameTableOffset};
615615 OS.patch ({{HeaderUpdatePos, Header, std::size (Header)}});
@@ -640,11 +640,11 @@ static Error writeMemProfV1(ProfOStream &OS,
640640 auto Schema = memprof::getFullSchema ();
641641 writeMemProfSchema (OS, Schema);
642642
643- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
644- &Schema, memprof::Version1);
643+ uint64_t RecordTableOffset =
644+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version1);
645645
646646 uint64_t FramePayloadOffset = OS.tell ();
647- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
647+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
648648
649649 uint64_t Header[] = {RecordTableOffset, FramePayloadOffset, FrameTableOffset};
650650 OS.patch ({{HeaderUpdatePos, Header, std::size (Header)}});
@@ -683,15 +683,15 @@ static Error writeMemProfV2(ProfOStream &OS,
683683 Schema = memprof::getFullSchema ();
684684 writeMemProfSchema (OS, Schema);
685685
686- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
687- &Schema, memprof::Version2);
686+ uint64_t RecordTableOffset =
687+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version2);
688688
689689 uint64_t FramePayloadOffset = OS.tell ();
690- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
690+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
691691
692692 uint64_t CallStackPayloadOffset = OS.tell ();
693693 uint64_t CallStackTableOffset =
694- writeMemProfCallStacks (OS, MemProfData.CallStackData );
694+ writeMemProfCallStacks (OS, MemProfData.CallStacks );
695695
696696 uint64_t Header[] = {
697697 RecordTableOffset, FramePayloadOffset, FrameTableOffset,
@@ -730,21 +730,21 @@ static Error writeMemProfV3(ProfOStream &OS,
730730 writeMemProfSchema (OS, Schema);
731731
732732 llvm::DenseMap<memprof::FrameId, memprof::FrameStat> FrameHistogram =
733- memprof::computeFrameHistogram (MemProfData.CallStackData );
734- assert (MemProfData.FrameData .size () == FrameHistogram.size ());
733+ memprof::computeFrameHistogram (MemProfData.CallStacks );
734+ assert (MemProfData.Frames .size () == FrameHistogram.size ());
735735
736736 llvm::DenseMap<memprof::FrameId, memprof::LinearFrameId> MemProfFrameIndexes =
737- writeMemProfFrameArray (OS, MemProfData.FrameData , FrameHistogram);
737+ writeMemProfFrameArray (OS, MemProfData.Frames , FrameHistogram);
738738
739739 uint64_t CallStackPayloadOffset = OS.tell ();
740740 llvm::DenseMap<memprof::CallStackId, memprof::LinearCallStackId>
741741 MemProfCallStackIndexes = writeMemProfCallStackArray (
742- OS, MemProfData.CallStackData , MemProfFrameIndexes, FrameHistogram);
742+ OS, MemProfData.CallStacks , MemProfFrameIndexes, FrameHistogram);
743743
744744 uint64_t RecordPayloadOffset = OS.tell ();
745745 uint64_t RecordTableOffset =
746- writeMemProfRecords (OS, MemProfData.RecordData , &Schema,
747- memprof::Version3, &MemProfCallStackIndexes);
746+ writeMemProfRecords (OS, MemProfData.Records , &Schema, memprof::Version3 ,
747+ &MemProfCallStackIndexes);
748748
749749 uint64_t Header[] = {
750750 CallStackPayloadOffset,
0 commit comments