@@ -274,7 +274,7 @@ void InstrProfWriter::addRecord(StringRef Name, uint64_t Hash,
274
274
275
275
void InstrProfWriter::addMemProfRecord (
276
276
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});
278
278
// If we inserted a new record then we are done.
279
279
if (Inserted) {
280
280
return ;
@@ -286,7 +286,7 @@ void InstrProfWriter::addMemProfRecord(
286
286
bool InstrProfWriter::addMemProfFrame (const memprof::FrameId Id,
287
287
const memprof::Frame &Frame,
288
288
function_ref<void (Error)> Warn) {
289
- auto [Iter, Inserted] = MemProfData.FrameData .insert ({Id, Frame});
289
+ auto [Iter, Inserted] = MemProfData.Frames .insert ({Id, Frame});
290
290
// If a mapping already exists for the current frame id and it does not
291
291
// match the new mapping provided then reset the existing contents and bail
292
292
// out. We don't support the merging of memprof data whose Frame -> Id
@@ -303,7 +303,7 @@ bool InstrProfWriter::addMemProfCallStack(
303
303
const memprof::CallStackId CSId,
304
304
const llvm::SmallVector<memprof::FrameId> &CallStack,
305
305
function_ref<void (Error)> Warn) {
306
- auto [Iter, Inserted] = MemProfData.CallStackData .insert ({CSId, CallStack});
306
+ auto [Iter, Inserted] = MemProfData.CallStacks .insert ({CSId, CallStack});
307
307
// If a mapping already exists for the current call stack id and it does not
308
308
// match the new mapping provided then reset the existing contents and bail
309
309
// out. We don't support the merging of memprof data whose CallStack -> Id
@@ -390,22 +390,22 @@ void InstrProfWriter::mergeRecordsFromWriter(InstrProfWriter &&IPW,
390
390
addTemporalProfileTraces (IPW.TemporalProfTraces ,
391
391
IPW.TemporalProfTraceStreamSize );
392
392
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 ) {
395
395
// If we weren't able to add the frame mappings then it doesn't make sense
396
396
// to try to merge the records from this profile.
397
397
if (!addMemProfFrame (FrameId, Frame, Warn))
398
398
return ;
399
399
}
400
400
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 ) {
403
403
if (!addMemProfCallStack (CSId, CallStack, Warn))
404
404
return ;
405
405
}
406
406
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 ) {
409
409
addMemProfRecord (GUID, Record);
410
410
}
411
411
}
@@ -605,11 +605,11 @@ static Error writeMemProfV0(ProfOStream &OS,
605
605
auto Schema = memprof::getFullSchema ();
606
606
writeMemProfSchema (OS, Schema);
607
607
608
- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
609
- &Schema, memprof::Version0);
608
+ uint64_t RecordTableOffset =
609
+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version0);
610
610
611
611
uint64_t FramePayloadOffset = OS.tell ();
612
- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
612
+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
613
613
614
614
uint64_t Header[] = {RecordTableOffset, FramePayloadOffset, FrameTableOffset};
615
615
OS.patch ({{HeaderUpdatePos, Header, std::size (Header)}});
@@ -640,11 +640,11 @@ static Error writeMemProfV1(ProfOStream &OS,
640
640
auto Schema = memprof::getFullSchema ();
641
641
writeMemProfSchema (OS, Schema);
642
642
643
- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
644
- &Schema, memprof::Version1);
643
+ uint64_t RecordTableOffset =
644
+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version1);
645
645
646
646
uint64_t FramePayloadOffset = OS.tell ();
647
- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
647
+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
648
648
649
649
uint64_t Header[] = {RecordTableOffset, FramePayloadOffset, FrameTableOffset};
650
650
OS.patch ({{HeaderUpdatePos, Header, std::size (Header)}});
@@ -683,15 +683,15 @@ static Error writeMemProfV2(ProfOStream &OS,
683
683
Schema = memprof::getFullSchema ();
684
684
writeMemProfSchema (OS, Schema);
685
685
686
- uint64_t RecordTableOffset = writeMemProfRecords (OS, MemProfData. RecordData ,
687
- &Schema, memprof::Version2);
686
+ uint64_t RecordTableOffset =
687
+ writeMemProfRecords (OS, MemProfData. Records , &Schema, memprof::Version2);
688
688
689
689
uint64_t FramePayloadOffset = OS.tell ();
690
- uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.FrameData );
690
+ uint64_t FrameTableOffset = writeMemProfFrames (OS, MemProfData.Frames );
691
691
692
692
uint64_t CallStackPayloadOffset = OS.tell ();
693
693
uint64_t CallStackTableOffset =
694
- writeMemProfCallStacks (OS, MemProfData.CallStackData );
694
+ writeMemProfCallStacks (OS, MemProfData.CallStacks );
695
695
696
696
uint64_t Header[] = {
697
697
RecordTableOffset, FramePayloadOffset, FrameTableOffset,
@@ -730,21 +730,21 @@ static Error writeMemProfV3(ProfOStream &OS,
730
730
writeMemProfSchema (OS, Schema);
731
731
732
732
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 ());
735
735
736
736
llvm::DenseMap<memprof::FrameId, memprof::LinearFrameId> MemProfFrameIndexes =
737
- writeMemProfFrameArray (OS, MemProfData.FrameData , FrameHistogram);
737
+ writeMemProfFrameArray (OS, MemProfData.Frames , FrameHistogram);
738
738
739
739
uint64_t CallStackPayloadOffset = OS.tell ();
740
740
llvm::DenseMap<memprof::CallStackId, memprof::LinearCallStackId>
741
741
MemProfCallStackIndexes = writeMemProfCallStackArray (
742
- OS, MemProfData.CallStackData , MemProfFrameIndexes, FrameHistogram);
742
+ OS, MemProfData.CallStacks , MemProfFrameIndexes, FrameHistogram);
743
743
744
744
uint64_t RecordPayloadOffset = OS.tell ();
745
745
uint64_t RecordTableOffset =
746
- writeMemProfRecords (OS, MemProfData.RecordData , &Schema,
747
- memprof::Version3, &MemProfCallStackIndexes);
746
+ writeMemProfRecords (OS, MemProfData.Records , &Schema, memprof::Version3 ,
747
+ &MemProfCallStackIndexes);
748
748
749
749
uint64_t Header[] = {
750
750
CallStackPayloadOffset,
0 commit comments