summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2019-09-21 09:11:51 +0000
committerAmara Emerson <aemerson@apple.com>2019-09-21 09:11:51 +0000
commit3bb56fa4789095631074d42dc61e1c1536342f8c (patch)
tree3f061dc79db1b852fd81c1b335c4746ba76ea2ae /llvm/lib/ProfileData/SampleProfReader.cpp
parent8a74eca398a012a9b3b18b10c2b5aedef203d04b (diff)
downloadbcm5719-llvm-3bb56fa4789095631074d42dc61e1c1536342f8c.tar.gz
bcm5719-llvm-3bb56fa4789095631074d42dc61e1c1536342f8c.zip
Revert "[SampleFDO] Expose an interface to return the size of a section or the size"
This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0. Broke the macOS build/greendragon bots. llvm-svn: 372464
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 07272ebac0a..f6b33d96261 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -667,36 +667,6 @@ std::error_code SampleProfileReaderExtBinaryBase::readHeader() {
return sampleprof_error::success;
}
-uint64_t SampleProfileReaderExtBinaryBase::getSectionSize(SecType Type) {
- for (auto &Entry : SecHdrTable) {
- if (Entry.Type == Type)
- return Entry.Size;
- }
- return 0;
-}
-
-uint64_t SampleProfileReaderExtBinaryBase::getFileSize() {
- auto &LastEntry = SecHdrTable.back();
- return LastEntry.Offset + LastEntry.Size;
-}
-
-bool SampleProfileReaderExtBinaryBase::dumpSectionInfo(raw_ostream &OS) {
- uint64_t TotalSecsSize = 0;
- for (auto &Entry : SecHdrTable) {
- OS << getSecName(Entry.Type) << " - Offset: " << Entry.Offset
- << ", Size: " << Entry.Size << "\n";
- TotalSecsSize += getSectionSize(Entry.Type);
- }
- uint64_t HeaderSize = SecHdrTable.front().Offset;
- assert(HeaderSize + TotalSecsSize == getFileSize() &&
- "Size of 'header + sections' doesn't match the total size of profile");
-
- OS << "Header Size: " << HeaderSize << "\n";
- OS << "Total Sections Size: " << TotalSecsSize << "\n";
- OS << "File Size: " << getFileSize() << "\n";
- return true;
-}
-
std::error_code SampleProfileReaderBinary::readMagicIdent() {
// Read and check the magic identifier.
auto Magic = readNumber<uint64_t>();
OpenPOWER on IntegriCloud