summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-profdata/llvm-profdata.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/tools/llvm-profdata/llvm-profdata.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/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp27
1 files changed, 2 insertions, 25 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index 2b1205b950f..4f825dfb5b8 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -982,21 +982,10 @@ static int showInstrProfile(const std::string &Filename, bool ShowCounts,
return 0;
}
-static void showSectionInfo(sampleprof::SampleProfileReader *Reader,
- raw_fd_ostream &OS) {
- if (!Reader->dumpSectionInfo(OS)) {
- WithColor::warning() << "-show-sec-info-only is only supported for "
- << "sample profile in extbinary format and is "
- << "ignored for other formats.\n";
- return;
- }
-}
-
static int showSampleProfile(const std::string &Filename, bool ShowCounts,
bool ShowAllFunctions,
const std::string &ShowFunction,
- bool ShowProfileSymbolList,
- bool ShowSectionInfoOnly, raw_fd_ostream &OS) {
+ bool ShowProfileSymbolList, raw_fd_ostream &OS) {
using namespace sampleprof;
LLVMContext Context;
auto ReaderOrErr = SampleProfileReader::create(Filename, Context);
@@ -1004,12 +993,6 @@ static int showSampleProfile(const std::string &Filename, bool ShowCounts,
exitWithErrorCode(EC, Filename);
auto Reader = std::move(ReaderOrErr.get());
-
- if (ShowSectionInfoOnly) {
- showSectionInfo(Reader.get(), OS);
- return 0;
- }
-
if (std::error_code EC = Reader->read())
exitWithErrorCode(EC, Filename);
@@ -1079,11 +1062,6 @@ static int show_main(int argc, const char *argv[]) {
cl::opt<bool> ShowProfileSymbolList(
"show-prof-sym-list", cl::init(false),
cl::desc("Show profile symbol list if it exists in the profile. "));
- cl::opt<bool> ShowSectionInfoOnly(
- "show-sec-info-only", cl::init(false),
- cl::desc("Show the information of each section in the sample profile. "
- "The flag is only usable when the sample profile is in "
- "extbinary format"));
cl::ParseCommandLineOptions(argc, argv, "LLVM profile data summary\n");
@@ -1112,8 +1090,7 @@ static int show_main(int argc, const char *argv[]) {
OnlyListBelow, ShowFunction, TextFormat, OS);
else
return showSampleProfile(Filename, ShowCounts, ShowAllFunctions,
- ShowFunction, ShowProfileSymbolList,
- ShowSectionInfoOnly, OS);
+ ShowFunction, ShowProfileSymbolList, OS);
}
int main(int argc, const char *argv[]) {
OpenPOWER on IntegriCloud