[llvm] [memprof] Add Version2 of the indexed MemProf format (PR #89100)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 14:01:10 PDT 2024
================
@@ -450,6 +474,67 @@ TEST_F(InstrProfTest, test_memprof) {
EXPECT_THAT(WantRecord, EqualsRecord(Record));
}
+TEST_F(InstrProfTest, test_memprof_v2) {
+ Writer.setMemProfVersionRequested(memprof::Version2);
+
+ ASSERT_THAT_ERROR(Writer.mergeProfileKind(InstrProfKind::MemProf),
+ Succeeded());
+
+ const IndexedMemProfRecord IndexedMR = makeRecordV2(
+ /*AllocFrames=*/{0x111, 0x222},
+ /*CallSiteFrames=*/{0x333});
+ const FrameIdMapTy IdToFrameMap = getFrameMapping();
----------------
kazutakahirata wrote:
`makeRecordV2` and `getFrameMapping` return by values, so I don't think I should use references here.
https://github.com/llvm/llvm-project/pull/89100
More information about the llvm-commits
mailing list