1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

[llvm-profdata] Report if profile data file is IR- or FE-level

Differential Revision: https://reviews.llvm.org/D39997

llvm-svn: 318159
This commit is contained in:
Adam Nemet 2017-11-14 16:59:18 +00:00
parent 36f9788b9b
commit 5bd1eddf91
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
RUN: llvm-profdata merge -o %t_clang.profdata %p/Inputs/clang_profile.proftext
RUN: llvm-profdata show %t_clang.profdata | FileCheck %s -check-prefix=FE
FE: Instrumentation level: Front-end
RUN: llvm-profdata merge -o %t_ir.profdata %p/Inputs/IR_profile.proftext
RUN: llvm-profdata show %t_ir.profdata | FileCheck %s -check-prefix=IR
IR: Instrumentation level: IR

View File

@ -625,6 +625,8 @@ static int showInstrProfile(const std::string &Filename, bool ShowCounts,
if (ShowCounts && TextFormat)
return 0;
std::unique_ptr<ProfileSummary> PS(Builder.getSummary());
OS << "Instrumentation level: "
<< (Reader->isIRLevelProfile() ? "IR" : "Front-end") << "\n";
if (ShowAllFunctions || !ShowFunction.empty())
OS << "Functions shown: " << ShownFunctions << "\n";
OS << "Total functions: " << PS->getNumFunctions() << "\n";