Skip to content

Commit

Permalink
[Doc][clang] Some PGO documentation improvements.
Browse files Browse the repository at this point in the history
Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D154239
  • Loading branch information
Wael Yehia committed Jul 11, 2023
1 parent 6641d2b commit 7ec844c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clang/docs/UsersManual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 different modifiers: ``%p``, ``%h``, and ``%m``.
can include different 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>]

Expand Down

0 comments on commit 7ec844c

Please sign in to comment.