summaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/MemProfTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/MemProfTest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index f5e4a4aff2ed..1cca44e9b037 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -280,7 +280,8 @@ TEST(MemProf, RecordSerializationRoundTrip) {
IndexedMemProfRecord Record;
for (const auto &ACS : AllocCallStacks) {
// Use the same info block for both allocation sites.
- Record.AllocSites.emplace_back(ACS, Info);
+ Record.AllocSites.emplace_back(ACS, llvm::memprof::hashCallStack(ACS),
+ Info);
}
Record.CallSites.assign(CallSites);
@@ -376,7 +377,9 @@ TEST(MemProf, BaseMemProfReader) {
Block.AllocCount = 1U, Block.TotalAccessDensity = 4,
Block.TotalLifetime = 200001;
std::array<FrameId, 2> CallStack{F1.hash(), F2.hash()};
- FakeRecord.AllocSites.emplace_back(/*CS=*/CallStack, /*MB=*/Block);
+ FakeRecord.AllocSites.emplace_back(
+ /*CS=*/CallStack, /*CSId=*/llvm::memprof::hashCallStack(CallStack),
+ /*MB=*/Block);
ProfData.insert({F1.hash(), FakeRecord});
MemProfReader Reader(FrameIdMap, ProfData);