Skip to content

Commit 9d8a11f

Browse files
[memprof] Remove verifyIndexedMemProfRecord and verifyFunctionProfileData (#117412)
This patch removes two functions to verify the consistency between: - IndexedAllocationInfo::CallStack - IndexedAllocationInfo::CSId Now that MemProf format Version 1 has been removed, IndexedAllocationInfo::CallStack doesn't participate in either serialization or deserialization, so we don't care about the consistency between the two fields in IndexAllocationInfo. Subsequent patches will remove uses of the old field and eventually remove the field.
1 parent 85601fd commit 9d8a11f

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,18 +1147,6 @@ template <typename FrameIdTy> class CallStackRadixTreeBuilder {
11471147
return std::move(CallStackPos);
11481148
}
11491149
};
1150-
1151-
// Verify that each CallStackId is computed with hashCallStack. This function
1152-
// is intended to help transition from CallStack to CSId in
1153-
// IndexedAllocationInfo.
1154-
void verifyIndexedMemProfRecord(const IndexedMemProfRecord &Record);
1155-
1156-
// Verify that each CallStackId is computed with hashCallStack. This function
1157-
// is intended to help transition from CallStack to CSId in
1158-
// IndexedAllocationInfo.
1159-
void verifyFunctionProfileData(
1160-
const llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord>
1161-
&FunctionProfileData);
11621150
} // namespace memprof
11631151
} // namespace llvm
11641152

llvm/lib/ProfileData/MemProf.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -537,22 +537,5 @@ template llvm::DenseMap<LinearFrameId, FrameStat>
537537
computeFrameHistogram<LinearFrameId>(
538538
llvm::MapVector<CallStackId, llvm::SmallVector<LinearFrameId>>
539539
&MemProfCallStackData);
540-
541-
void verifyIndexedMemProfRecord(const IndexedMemProfRecord &Record) {
542-
for (const auto &AS : Record.AllocSites) {
543-
assert(AS.CSId == hashCallStack(AS.CallStack));
544-
(void)AS;
545-
}
546-
}
547-
548-
void verifyFunctionProfileData(
549-
const llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord>
550-
&FunctionProfileData) {
551-
for (const auto &[GUID, Record] : FunctionProfileData) {
552-
(void)GUID;
553-
verifyIndexedMemProfRecord(Record);
554-
}
555-
}
556-
557540
} // namespace memprof
558541
} // namespace llvm

llvm/lib/ProfileData/MemProfReader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,6 @@ Error RawMemProfReader::mapRawProfileToRecords() {
549549
}
550550
}
551551

552-
verifyFunctionProfileData(FunctionProfileData);
553-
554552
return Error::success();
555553
}
556554

0 commit comments

Comments
 (0)