Skip to content

[NFC][MemProf] Fix typo in type name #140500

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

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
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: 7 additions & 7 deletions llvm/include/llvm/ProfileData/MemProf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1090,18 +1090,18 @@ struct IndexedMemProfData {

// A convenience wrapper around FrameIdConverter and CallStackIdConverter for
// tests.
struct IndexedCallstackIdConveter {
IndexedCallstackIdConveter() = delete;
IndexedCallstackIdConveter(IndexedMemProfData &MemProfData)
struct IndexedCallstackIdConverter {
IndexedCallstackIdConverter() = delete;
IndexedCallstackIdConverter(IndexedMemProfData &MemProfData)
: FrameIdConv(MemProfData.Frames),
CSIdConv(MemProfData.CallStacks, FrameIdConv) {}

// Delete the copy constructor and copy assignment operator to avoid a
// situation where a copy of IndexedCallStackIdConverter gets an error in
// situation where a copy of IndexedCallstackIdConverter gets an error in
// LastUnmappedId while the original instance doesn't.
IndexedCallstackIdConveter(const IndexedCallstackIdConveter &) = delete;
IndexedCallstackIdConveter &
operator=(const IndexedCallstackIdConveter &) = delete;
IndexedCallstackIdConverter(const IndexedCallstackIdConverter &) = delete;
IndexedCallstackIdConverter &
operator=(const IndexedCallstackIdConverter &) = delete;

std::vector<Frame> operator()(CallStackId CSId) { return CSIdConv(CSId); }

Expand Down
6 changes: 3 additions & 3 deletions llvm/unittests/ProfileData/InstrProfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ TEST_F(InstrProfTest, test_memprof_v2_full_schema) {
ASSERT_THAT_ERROR(RecordOr.takeError(), Succeeded());
const memprof::MemProfRecord &Record = RecordOr.get();

memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);

const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
Expand Down Expand Up @@ -491,7 +491,7 @@ TEST_F(InstrProfTest, test_memprof_v2_partial_schema) {
ASSERT_THAT_ERROR(RecordOr.takeError(), Succeeded());
const memprof::MemProfRecord &Record = RecordOr.get();

memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);

const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
Expand Down Expand Up @@ -609,7 +609,7 @@ TEST_F(InstrProfTest, test_memprof_merge) {

std::optional<memprof::FrameId> LastUnmappedFrameId;

memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);

const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
Expand Down
10 changes: 5 additions & 5 deletions llvm/unittests/ProfileData/MemProfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ TEST(MemProf, IndexedMemProfRecordToMemProfRecord) {
IndexedRecord.CallSites.push_back(IndexedCallSiteInfo(CS3Id));
IndexedRecord.CallSites.push_back(IndexedCallSiteInfo(CS4Id));

IndexedCallstackIdConveter CSIdConv(MemProfData);
IndexedCallstackIdConverter CSIdConv(MemProfData);

MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);

Expand Down Expand Up @@ -591,7 +591,7 @@ TEST(MemProf, MissingCallStackId) {

// Create empty maps.
IndexedMemProfData MemProfData;
IndexedCallstackIdConveter CSIdConv(MemProfData);
IndexedCallstackIdConverter CSIdConv(MemProfData);

// We are only interested in errors, not the return value.
(void)IndexedMR.toMemProfRecord(CSIdConv);
Expand All @@ -609,7 +609,7 @@ TEST(MemProf, MissingFrameId) {
IndexedMemProfRecord IndexedMR;
IndexedMR.AllocSites.emplace_back(CSId, makePartialMIB(), getHotColdSchema());

IndexedCallstackIdConveter CSIdConv(MemProfData);
IndexedCallstackIdConverter CSIdConv(MemProfData);

// We are only interested in errors, not the return value.
(void)IndexedMR.toMemProfRecord(CSIdConv);
Expand Down Expand Up @@ -763,7 +763,7 @@ TEST(MemProf, YAMLParser) {
const auto &[GUID, IndexedRecord] = MemProfData.Records.front();
EXPECT_EQ(GUID, 0xdeadbeef12345678ULL);

IndexedCallstackIdConveter CSIdConv(MemProfData);
IndexedCallstackIdConverter CSIdConv(MemProfData);
MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);

ASSERT_THAT(Record.AllocSites, SizeIs(2));
Expand Down Expand Up @@ -814,7 +814,7 @@ TEST(MemProf, YAMLParserGUID) {
const auto &[GUID, IndexedRecord] = MemProfData.Records.front();
EXPECT_EQ(GUID, IndexedMemProfRecord::getGUID("_Z3fooi"));

IndexedCallstackIdConveter CSIdConv(MemProfData);
IndexedCallstackIdConverter CSIdConv(MemProfData);
MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);

ASSERT_THAT(Record.AllocSites, SizeIs(1));
Expand Down
Loading