From 9a2120a6e1fcefbfabbe8d25f14e056fadc37f2d Mon Sep 17 00:00:00 2001 From: Wenlei He Date: Sun, 2 Jan 2022 16:25:27 -0800 Subject: [PATCH] [llvm-profgen] Error out for unsupported AutoFDO profile generate with probe Error out instead of siliently generate empty profile when trying to generate AutoFDO profile with probe binary. Differential Revision: https://reviews.llvm.org/D116508 --- llvm/tools/llvm-profgen/ProfileGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/tools/llvm-profgen/ProfileGenerator.cpp b/llvm/tools/llvm-profgen/ProfileGenerator.cpp index f03e407dbe7d..7155ec4a4219 100644 --- a/llvm/tools/llvm-profgen/ProfileGenerator.cpp +++ b/llvm/tools/llvm-profgen/ProfileGenerator.cpp @@ -383,6 +383,8 @@ ProfileGenerator::getTopLevelFunctionProfile(StringRef FuncName) { void ProfileGenerator::generateProfile() { if (Binary->usePseudoProbes()) { // TODO: Support probe based profile generation + exitWithError("Probe based profile generation not supported for AutoFDO, " + "consider dropping `--ignore-stack-samples` or adding `--use-dwarf-correlation`."); } else { generateLineNumBasedProfile(); }