[clang] [Clang][PGO][UserManual] Specify usage of -b flag (PR #139763)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 09:51:12 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Madhur Amilkanthwar (madhur13490)
<details>
<summary>Changes</summary>
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.`
---
Full diff: https://github.com/llvm/llvm-project/pull/139763.diff
1 Files Affected:
- (modified) clang/docs/UsersManual.rst (+3)
``````````diff
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:
``````````
</details>
https://github.com/llvm/llvm-project/pull/139763
More information about the cfe-commits
mailing list