[clang] 7ec844c - [Doc][clang] Some PGO documentation improvements.

Wael Yehia via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 09:27:01 PDT 2023


Author: Wael Yehia
Date: 2023-07-11T16:26:48Z
New Revision: 7ec844c881a23bf0d2e4450ac9ca97091490084f

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

LOG: [Doc][clang] Some PGO documentation improvements.

Reviewed By: phosek

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

Added: 
    

Modified: 
    clang/docs/UsersManual.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index da9d0d364cd03a..14af07d35f5e1d 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -2603,7 +2603,7 @@ instrumentation:
    environment variable to specify an alternate file. If non-default file name
    is specified by both the environment variable and the command line option,
    the environment variable takes precedence. The file name pattern specified
-   can include 
diff erent modifiers: ``%p``, ``%h``, and ``%m``.
+   can include 
diff erent modifiers: ``%p``, ``%h``, ``%m``, ``%t``, and ``%c``.
 
    Any instance of ``%p`` in that file name will be replaced by the process
    ID, so that you can easily distinguish the profile output from multiple
@@ -2639,6 +2639,8 @@ instrumentation:
 
      $ LLVM_PROFILE_FILE="code-%m.profraw" ./code
 
+   See `this <SourceBasedCodeCoverage.html#running-the-instrumented-program>`_ section
+   about the ``%t``, and ``%c`` modifiers.
 
 3. Combine profiles from multiple runs and convert the "raw" profile format to
    the input expected by clang. Use the ``merge`` command of the
@@ -2700,6 +2702,8 @@ programs using the same instrumentation method as ``-fprofile-generate``.
   the profile dumping path specified at command line, the environment variable
   ``LLVM_PROFILE_FILE`` can still be used to override
   the directory and filename for the profile file at runtime.
+  To override the path and filename at compile time, use
+  ``-Xclang -fprofile-instrument-path=/path/to/file_pattern.profraw``.
 
 .. option:: -fcs-profile-generate[=<dirname>]
 


        


More information about the cfe-commits mailing list