[clang] aef39f5 - [Clang][PGO][UserManual] Specify usage of -b flag (#139763)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 13 21:53:20 PDT 2025


Author: Madhur Amilkanthwar
Date: 2025-05-14T10:23:17+05:30
New Revision: aef39f5dcb8b0c73cef4192c5d49a32de7d4ef44

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

LOG: [Clang][PGO][UserManual] Specify usage of -b flag (#139763)

llvm-profgen cannot accept the perf profiles collected without `-b` and
errors out with a message `"Invalid perf script input!"`.

This can also be validated from the code in function
`checkPerfScriptType()` in `tools/llvm-profgen/PerfReader.cpp.`

Added: 
    

Modified: 
    clang/docs/UsersManual.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 6f804a10748d8..00899dcb8d8c2 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -2792,6 +2792,9 @@ usual build cycle when using sample profilers for optimization:
 
      $ llvm-profgen --binary=./code --output=code.prof --perfdata=perf.data
 
+   Please note, ``perf.data`` must be collected with ``-b`` flag to Linux ``perf``
+   for the above step to work.
+
    When using SEP the output is in the textual format corresponding to
    ``llvm-profgen --perfscript``. For example:
 


        


More information about the cfe-commits mailing list