mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-02 17:29:03 +00: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:
parent
36f9788b9b
commit
5bd1eddf91
7
test/tools/llvm-profdata/show-instr-level.test
Normal file
7
test/tools/llvm-profdata/show-instr-level.test
Normal 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
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user