[llvm] 1a0d23e - [NFC] Generalize llvm-profgen message to cover both AutoFDO and CSSPGO

Wenlei He via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 09:48:19 PDT 2023


Author: Wenlei He
Date: 2023-06-26T09:47:56-07:00
New Revision: 1a0d23efe1573e1d5d547c80939ec2bdb7e2524a

URL: https://github.com/llvm/llvm-project/commit/1a0d23efe1573e1d5d547c80939ec2bdb7e2524a
DIFF: https://github.com/llvm/llvm-project/commit/1a0d23efe1573e1d5d547c80939ec2bdb7e2524a.diff

LOG: [NFC] Generalize llvm-profgen message to cover both AutoFDO and CSSPGO

Update llvm-profgen profile density message to cover both AutoFDO and CSSPGO.

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

Added: 
    

Modified: 
    llvm/test/tools/llvm-profgen/profile-density.test
    llvm/tools/llvm-profgen/ProfileGenerator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-profgen/profile-density.test b/llvm/test/tools/llvm-profgen/profile-density.test
index 1d7c2f9cd5dfe..0eb83838d16e7 100644
--- a/llvm/test/tools/llvm-profgen/profile-density.test
+++ b/llvm/test/tools/llvm-profgen/profile-density.test
@@ -4,7 +4,7 @@
 ; RUN: llvm-profgen --format=text --unsymbolized-profile=%S/Inputs/profile-density-cs.raw.prof --binary=%S/Inputs/inline-noprobe2.perfbin --output=%t3 --show-density -hot-function-density-threshold=1 &> %t4
 ; RUN: FileCheck %s --input-file %t4 --check-prefix=CHECK-DENSITY-CS
 
-;CHECK-DENSITY: AutoFDO is estimated to optimize better with 3.1x more samples. Please consider increasing sampling rate or profiling for longer duration to get more samples.
+;CHECK-DENSITY: Sample PGO is estimated to optimize better with 3.1x more samples. Please consider increasing sampling rate or profiling for longer duration to get more samples.
 ;CHECK-DENSITY: Minimum profile density for hot functions with top 99.00% total samples: 3.2
 
 ;CHECK-DENSITY-CS: Minimum profile density for hot functions with top 99.00% total samples: 128.3

diff  --git a/llvm/tools/llvm-profgen/ProfileGenerator.cpp b/llvm/tools/llvm-profgen/ProfileGenerator.cpp
index 6632b003a236d..97bc8d59b6cd7 100644
--- a/llvm/tools/llvm-profgen/ProfileGenerator.cpp
+++ b/llvm/tools/llvm-profgen/ProfileGenerator.cpp
@@ -183,7 +183,7 @@ void ProfileGeneratorBase::showDensitySuggestion(double Density) {
                             "set too low. Please check your command.\n";
   else if (Density < HotFunctionDensityThreshold)
     WithColor::warning()
-        << "AutoFDO is estimated to optimize better with "
+        << "Sample PGO is estimated to optimize better with "
         << format("%.1f", HotFunctionDensityThreshold / Density)
         << "x more samples. Please consider increasing sampling rate or "
            "profiling for longer duration to get more samples.\n";


        


More information about the llvm-commits mailing list