Index: llvm/trunk/test/tools/llvm-profdata/show-instr-level.test =================================================================== --- llvm/trunk/test/tools/llvm-profdata/show-instr-level.test +++ llvm/trunk/test/tools/llvm-profdata/show-instr-level.test @@ -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 Index: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp =================================================================== --- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp +++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp @@ -625,6 +625,8 @@ if (ShowCounts && TextFormat) return 0; std::unique_ptr 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";