[llvm] [memprof] Add Version2 of the indexed MemProf format (PR #89100)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 13:20:36 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();
----------------
snehasish wrote:
nit: References here and below to avoid a copy? Not really a performance concern since it's a test.
https://github.com/llvm/llvm-project/pull/89100
More information about the llvm-commits
mailing list