Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[memprof] Remove getFullSchema in MemProfTest.cpp #90072

Merged
merged 1 commit into from
Apr 25, 2024
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
14 changes: 3 additions & 11 deletions llvm/unittests/ProfileData/MemProfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,6 @@ MATCHER_P4(FrameContains, FunctionName, LineOffset, Column, Inline, "") {
return false;
}

MemProfSchema getFullSchema() {
MemProfSchema Schema;
#define MIBEntryDef(NameTag, Name, Type) Schema.push_back(Meta::Name);
#include "llvm/ProfileData/MIBEntryDef.inc"
#undef MIBEntryDef
return Schema;
}

TEST(MemProf, FillsValue) {
std::unique_ptr<MockSymbolizer> Symbolizer(new MockSymbolizer());

Expand Down Expand Up @@ -248,7 +240,7 @@ TEST(MemProf, PortableWrapper) {
/*dealloc_timestamp=*/2000, /*alloc_cpu=*/3,
/*dealloc_cpu=*/4);

const auto Schema = getFullSchema();
const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema();
PortableMemInfoBlock WriteBlock(Info);

std::string Buffer;
Expand All @@ -271,7 +263,7 @@ TEST(MemProf, PortableWrapper) {
// Version0 and Version1 serialize IndexedMemProfRecord in the same format, so
// we share one test.
TEST(MemProf, RecordSerializationRoundTripVersion0And1) {
const MemProfSchema Schema = getFullSchema();
const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema();

MemInfoBlock Info(/*size=*/16, /*access_count=*/7, /*alloc_timestamp=*/1000,
/*dealloc_timestamp=*/2000, /*alloc_cpu=*/3,
Expand Down Expand Up @@ -305,7 +297,7 @@ TEST(MemProf, RecordSerializationRoundTripVersion0And1) {
}

TEST(MemProf, RecordSerializationRoundTripVerion2) {
const MemProfSchema Schema = getFullSchema();
const auto Schema = llvm::memprof::PortableMemInfoBlock::getFullSchema();

MemInfoBlock Info(/*size=*/16, /*access_count=*/7, /*alloc_timestamp=*/1000,
/*dealloc_timestamp=*/2000, /*alloc_cpu=*/3,
Expand Down
Loading