diff options
author | Wei Mi <wmi@google.com> | 2020-04-07 12:54:51 -0700 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2020-04-07 12:54:51 -0700 |
commit | c5da949ae8ce241ff171b2a027e730f4fd34232e (patch) | |
tree | c4beac20e0e43611cb843470cde86cb98536f870 /llvm/lib/ProfileData/SampleProfReader.cpp | |
parent | c0a33aaa804847e74e1514ce881d43435e94c172 (diff) | |
download | llvm-c5da949ae8ce241ff171b2a027e730f4fd34232e.zip llvm-c5da949ae8ce241ff171b2a027e730f4fd34232e.tar.gz llvm-c5da949ae8ce241ff171b2a027e730f4fd34232e.tar.bz2 |
Revert "[SampleFDO] Add flag for partial profile." show-prof-info.test breaks on some platforms.
This reverts commit e3ba652a1440794eff0b43ce747f1b0488585d22.
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r-- | llvm/lib/ProfileData/SampleProfReader.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp index e27bf07..33efb51 100644 --- a/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/llvm/lib/ProfileData/SampleProfReader.cpp @@ -478,8 +478,6 @@ std::error_code SampleProfileReaderExtBinary::readOneSection( case SecProfSummary: if (std::error_code EC = readSummary()) return EC; - if (hasSecFlag(Entry, SecProfSummaryFlags::SecFlagPartial)) - Summary->setPartialProfile(true); break; case SecNameTable: if (std::error_code EC = readNameTableSec( @@ -833,40 +831,11 @@ uint64_t SampleProfileReaderExtBinaryBase::getFileSize() { return FileSize; } -static std::string getSecFlagsStr(const SecHdrTableEntry &Entry) { - std::string Flags; - if (hasSecFlag(Entry, SecCommonFlags::SecFlagCompress)) - Flags.append("{compressed,"); - else - Flags.append("{"); - - switch (Entry.Type) { - case SecNameTable: - if (hasSecFlag(Entry, SecNameTableFlags::SecFlagMD5Name)) - Flags.append("md5,"); - break; - case SecProfSummary: - if (hasSecFlag(Entry, SecProfSummaryFlags::SecFlagPartial)) - Flags.append("partial,"); - break; - default: - break; - } - char &last = Flags.back(); - if (last == ',') - last = '}'; - else - Flags.append("}"); - return Flags; -} - bool SampleProfileReaderExtBinaryBase::dumpSectionInfo(raw_ostream &OS) { uint64_t TotalSecsSize = 0; for (auto &Entry : SecHdrTable) { OS << getSecName(Entry.Type) << " - Offset: " << Entry.Offset - << ", Size: " << Entry.Size << ", Flags: " << getSecFlagsStr(Entry) - << "\n"; - ; + << ", Size: " << Entry.Size << "\n"; TotalSecsSize += getSectionSize(Entry.Type); } uint64_t HeaderSize = SecHdrTable.front().Offset; |