Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions llvm/unittests/ProfileData/InstrProfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ MemInfoBlock makePartialMIB() {
}

IndexedMemProfRecord
makeRecordV2(std::initializer_list<::llvm::memprof::CallStackId> AllocFrames,
std::initializer_list<::llvm::memprof::CallStackId> CallSiteFrames,
const MemInfoBlock &Block, const memprof::MemProfSchema &Schema) {
makeRecord(std::initializer_list<::llvm::memprof::CallStackId> AllocFrames,
std::initializer_list<::llvm::memprof::CallStackId> CallSiteFrames,
const MemInfoBlock &Block, const memprof::MemProfSchema &Schema) {
IndexedMemProfRecord MR;
for (const auto &CSId : AllocFrames)
MR.AllocSites.emplace_back(CSId, Block, Schema);
Expand Down Expand Up @@ -436,16 +436,16 @@ MATCHER_P(EqualsRecord, Want, "") {
return true;
}

TEST_F(InstrProfTest, test_memprof_v2_full_schema) {
TEST_F(InstrProfTest, test_memprof_v4_full_schema) {
const MemInfoBlock MIB = makeFullMIB();

Writer.setMemProfVersionRequested(memprof::Version2);
Writer.setMemProfVersionRequested(memprof::Version4);
Writer.setMemProfFullSchema(true);

ASSERT_THAT_ERROR(Writer.mergeProfileKind(InstrProfKind::MemProf),
Succeeded());

const IndexedMemProfRecord IndexedMR = makeRecordV2(
const IndexedMemProfRecord IndexedMR = makeRecord(
/*AllocFrames=*/{0x111, 0x222},
/*CallSiteFrames=*/{0x333}, MIB, memprof::getFullSchema());
IndexedMemProfData MemProfData = getMemProfDataForTest();
Expand All @@ -470,16 +470,16 @@ TEST_F(InstrProfTest, test_memprof_v2_full_schema) {
EXPECT_THAT(WantRecord, EqualsRecord(Record));
}

TEST_F(InstrProfTest, test_memprof_v2_partial_schema) {
TEST_F(InstrProfTest, test_memprof_v4_partial_schema) {
const MemInfoBlock MIB = makePartialMIB();

Writer.setMemProfVersionRequested(memprof::Version2);
Writer.setMemProfVersionRequested(memprof::Version4);
Writer.setMemProfFullSchema(false);

ASSERT_THAT_ERROR(Writer.mergeProfileKind(InstrProfKind::MemProf),
Succeeded());

const IndexedMemProfRecord IndexedMR = makeRecordV2(
const IndexedMemProfRecord IndexedMR = makeRecord(
/*AllocFrames=*/{0x111, 0x222},
/*CallSiteFrames=*/{0x333}, MIB, memprof::getHotColdSchema());
IndexedMemProfData MemProfData = getMemProfDataForTest();
Expand Down Expand Up @@ -525,7 +525,7 @@ TEST_F(InstrProfTest, test_caller_callee_pairs) {
// Line: 7, Column: 8
// new(...)

const IndexedMemProfRecord IndexedMR = makeRecordV2(
const IndexedMemProfRecord IndexedMR = makeRecord(
/*AllocFrames=*/{0x111, 0x222},
/*CallSiteFrames=*/{}, MIB, memprof::getHotColdSchema());

Expand Down Expand Up @@ -584,7 +584,7 @@ TEST_F(InstrProfTest, test_memprof_merge) {
ASSERT_THAT_ERROR(Writer2.mergeProfileKind(InstrProfKind::MemProf),
Succeeded());

const IndexedMemProfRecord IndexedMR = makeRecordV2(
const IndexedMemProfRecord IndexedMR = makeRecord(
/*AllocFrames=*/{0x111, 0x222},
/*CallSiteFrames=*/{}, makePartialMIB(), memprof::getHotColdSchema());

Expand Down