Skip to content

Commit e19f865

Browse files
author
Snehasish Kumar
committed
Update usage in MemProfiler.cpp and MemProfUseTest.cpp.
1 parent 81c5f65 commit e19f865

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ undriftMemProfRecord(const DenseMap<uint64_t, LocToLocMap> &UndriftMaps,
954954
UndriftCallStack(AS.CallStack);
955955

956956
for (auto &CS : MemProfRec.CallSites)
957-
UndriftCallStack(CS);
957+
UndriftCallStack(CS.Frames);
958958
}
959959

960960
static void
@@ -1048,15 +1048,16 @@ readMemprof(Module &M, Function &F, IndexedInstrProfReader *MemProfReader,
10481048
// Need to record all frames from leaf up to and including this function,
10491049
// as any of these may or may not have been inlined at this point.
10501050
unsigned Idx = 0;
1051-
for (auto &StackFrame : CS) {
1051+
for (auto &StackFrame : CS.Frames) {
10521052
uint64_t StackId = computeStackId(StackFrame);
1053-
LocHashToCallSites[StackId].insert(ArrayRef<Frame>(CS).drop_front(Idx++));
1053+
LocHashToCallSites[StackId].insert(
1054+
ArrayRef<Frame>(CS.Frames).drop_front(Idx++));
10541055
ProfileHasColumns |= StackFrame.Column;
10551056
// Once we find this function, we can stop recording.
10561057
if (StackFrame.Function == FuncGUID)
10571058
break;
10581059
}
1059-
assert(Idx <= CS.size() && CS[Idx - 1].Function == FuncGUID);
1060+
assert(Idx <= CS.Frames.size() && CS.Frames[Idx - 1].Function == FuncGUID);
10601061
}
10611062

10621063
auto GetOffset = [](const DILocation *DIL) {

llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ makeRecordV2(std::initializer_list<CallStackId> AllocFrames,
320320
for (const auto &CSId : AllocFrames)
321321
MR.AllocSites.emplace_back(CSId, Block, Schema);
322322
for (const auto &CSId : CallSiteFrames)
323-
MR.CallSiteIds.push_back(CSId);
323+
MR.CallSites.push_back(IndexedCallSiteInfo(CSId));
324324
return MR;
325325
}
326326

0 commit comments

Comments
 (0)