[clang] Improve documented sampling profiler steps to best known methods (PR #88438)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 09:22:17 PDT 2024
================
@@ -2547,22 +2547,40 @@ usual build cycle when using sample profilers for optimization:
used in the first step. The only requirement is that you build the code
with the same debug info options and ``-fprofile-sample-use``.
+ On Linux:
+
.. code-block:: console
$ clang++ -O2 -gline-tables-only \
-fdebug-info-for-profiling -funique-internal-linkage-names \
-fprofile-sample-use=code.prof code.cc -o code
- [OPTIONAL] Sampling-based profiles can have inaccuracies or missing block/
- edge counters. The profile inference algorithm (profi) can be used to infer
- missing blocks and edge counts, and improve the quality of profile data.
- Enable it with ``-fsample-profile-use-profi``.
+ On Windows:
- .. code-block:: console
+ .. code-block:: winbatch
+
+ > clang-cl -O2 -gdwarf -gline-tables-only ^
----------------
chrulski-intel wrote:
Since these commands are using 'clang-cl', would it be better to show and use the options in the native clang-cl format described at line 4557 for consistency instead of mixing slashes and hyphens? i.e. /O2 instead of -O2, and /Fe instead of -o, etc.
https://github.com/llvm/llvm-project/pull/88438
More information about the cfe-commits
mailing list