File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -529,9 +529,7 @@ Error RawMemProfReader::mapRawProfileToRecords() {
529
529
// first non-inline frame.
530
530
for (size_t I = 0 ; /* Break out using the condition below*/ ; I++) {
531
531
const Frame &F = idToFrame (Callstack[I]);
532
- auto Result =
533
- FunctionProfileData.insert ({F.Function , IndexedMemProfRecord ()});
534
- IndexedMemProfRecord &Record = Result.first ->second ;
532
+ IndexedMemProfRecord &Record = FunctionProfileData[F.Function ];
535
533
Record.AllocSites .emplace_back (Callstack, CSId, MIB);
536
534
537
535
if (!F.IsInlineFrame )
@@ -543,8 +541,7 @@ Error RawMemProfReader::mapRawProfileToRecords() {
543
541
for (const auto &[Id, Locs] : PerFunctionCallSites) {
544
542
// Some functions may have only callsite data and no allocation data. Here
545
543
// we insert a new entry for callsite data if we need to.
546
- auto Result = FunctionProfileData.insert ({Id, IndexedMemProfRecord ()});
547
- IndexedMemProfRecord &Record = Result.first ->second ;
544
+ IndexedMemProfRecord &Record = FunctionProfileData[Id];
548
545
for (LocationPtr Loc : Locs) {
549
546
CallStackId CSId = hashCallStack (*Loc);
550
547
CSIdToCallStack.insert ({CSId, *Loc});
You can’t perform that action at this time.
0 commit comments