diff options
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r-- | llvm/tools/llvm-profdata/llvm-profdata.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index d45e6afa5a5..1b042be8a3f 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -281,7 +281,7 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, if (ShowDetailedSummary && DetailedSummaryCutoffs.empty()) { Cutoffs = {800000, 900000, 950000, 990000, 999000, 999900, 999990}; } - InstrProfSummary PS(Cutoffs); + InstrProfSummaryBuilder Builder(Cutoffs); if (Error E = ReaderOrErr.takeError()) exitWithError(std::move(E), Filename); @@ -302,7 +302,7 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, } assert(Func.Counts.size() > 0 && "function missing entry counter"); - PS.addRecord(Func); + Builder.addRecord(Func); if (Show) { @@ -353,18 +353,19 @@ static int showInstrProfile(std::string Filename, bool ShowCounts, if (ShowCounts && TextFormat) return 0; - + std::unique_ptr<InstrProfSummary> PS(Builder.getSummary()); if (ShowAllFunctions || !ShowFunction.empty()) OS << "Functions shown: " << ShownFunctions << "\n"; - OS << "Total functions: " << PS.getNumFunctions() << "\n"; - OS << "Maximum function count: " << PS.getMaxFunctionCount() << "\n"; - OS << "Maximum internal block count: " << PS.getMaxInternalBlockCount() << "\n"; + OS << "Total functions: " << PS->getNumFunctions() << "\n"; + OS << "Maximum function count: " << PS->getMaxFunctionCount() << "\n"; + OS << "Maximum internal block count: " << PS->getMaxInternalBlockCount() + << "\n"; if (ShowDetailedSummary) { OS << "Detailed summary:\n"; - OS << "Total number of blocks: " << PS.getNumBlocks() << "\n"; - OS << "Total count: " << PS.getTotalCount() << "\n"; - for (auto Entry : PS.getDetailedSummary()) { + OS << "Total number of blocks: " << PS->getNumBlocks() << "\n"; + OS << "Total count: " << PS->getTotalCount() << "\n"; + for (auto Entry : PS->getDetailedSummary()) { OS << Entry.NumCounts << " blocks with count >= " << Entry.MinCount << " account for " << format("%0.6g", (float)Entry.Cutoff / ProfileSummary::Scale * 100) |