diff options
Diffstat (limited to 'clang/docs/UsersManual.rst')
-rw-r--r-- | clang/docs/UsersManual.rst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index 2d10489..01f0b27 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -2780,6 +2780,25 @@ usual build cycle when using sample profilers for optimization: /clang:-fdebug-info-for-profiling /clang:-funique-internal-linkage-names ^ code.cc /Fe:code -fuse-ld=lld /link /debug:dwarf + [OPTIONAL] Pseudo instrumentation can be used as the anchor for accurate + profile mapping with the ``-fpseudo-probe-for-profiling`` option. + + On Linux: + + .. code-block:: console + + $ clang++ -O2 -gline-tables-only \ + -fpseudo-probe-for-profiling -funique-internal-linkage-names \ + code.cc -o code + + On Windows: + + .. code-block:: winbatch + + > clang-cl /O2 -gdwarf -gline-tables-only ^ + -fpseudo-probe-for-profiling /clang:-funique-internal-linkage-names ^ + code.cc /Fe:code -fuse-ld=lld /link /debug:dwarf + .. note:: :ref:`-funique-internal-linkage-names <funique_internal_linkage_names>` @@ -2881,6 +2900,25 @@ usual build cycle when using sample profilers for optimization: /clang:-fdebug-info-for-profiling /clang:-funique-internal-linkage-names ^ -fprofile-sample-use=code.prof code.cc /Fe:code + [OPTIONAL] Pseudo instrumentation can be used as the anchor for accurate + profile mapping with the ``-fpseudo-probe-for-profiling`` option. + + On Linux: + + .. code-block:: console + + $ clang++ -O2 \ + -fpseudo-probe-for-profiling -funique-internal-linkage-names \ + -fprofile-sample-use=code.prof code.cc -o code + + On Windows: + + .. code-block:: winbatch + + > clang-cl /O2 ^ + -fpseudo-probe-for-profiling /clang:-funique-internal-linkage-names ^ + -fprofile-sample-use=code.prof code.cc /Fe: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. |