This revision was automatically updated to reflect the committed changes.
Closed by commit rG01f13f487775: Explain code coverage with Lit in 
docs/SourceBasedCodeCoverage.rst (authored by FlashSheridan, committed by 
gkistanova).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140730/new/

https://reviews.llvm.org/D140730

Files:
  clang/docs/SourceBasedCodeCoverage.rst


Index: clang/docs/SourceBasedCodeCoverage.rst
===================================================================
--- clang/docs/SourceBasedCodeCoverage.rst
+++ clang/docs/SourceBasedCodeCoverage.rst
@@ -127,6 +127,11 @@
 other platforms by passing the ``-runtime-counter-relocation`` option to the
 backend during compilation.
 
+For a program such as the :doc:`Lit <CommandGuide/lit>` testing tool which
+invokes other programs, it may be necessary to set ``LLVM_PROFILE_FILE`` for
+each invocation. The pattern strings "%p" or "%Nm" may help to avoid
+corruption due to concurrency.
+
 .. code-block:: console
 
     % clang++ -fprofile-instr-generate -fcoverage-mapping -mllvm 
-runtime-counter-relocation foo.cc -o foo
@@ -143,6 +148,9 @@
     # Step 3(a): Index the raw profile.
     % llvm-profdata merge -sparse foo.profraw -o foo.profdata
 
+For an example of merging multiple profiles created by testing,
+see the LLVM `coverage build script 
<https://github.com/llvm/llvm-zorg/blob/main/zorg/jenkins/jobs/jobs/llvm-coverage>`_.
+
 There are multiple different ways to render coverage reports. The simplest
 option is to generate a line-oriented report:
 


Index: clang/docs/SourceBasedCodeCoverage.rst
===================================================================
--- clang/docs/SourceBasedCodeCoverage.rst
+++ clang/docs/SourceBasedCodeCoverage.rst
@@ -127,6 +127,11 @@
 other platforms by passing the ``-runtime-counter-relocation`` option to the
 backend during compilation.
 
+For a program such as the :doc:`Lit <CommandGuide/lit>` testing tool which
+invokes other programs, it may be necessary to set ``LLVM_PROFILE_FILE`` for
+each invocation. The pattern strings "%p" or "%Nm" may help to avoid
+corruption due to concurrency.
+
 .. code-block:: console
 
     % clang++ -fprofile-instr-generate -fcoverage-mapping -mllvm -runtime-counter-relocation foo.cc -o foo
@@ -143,6 +148,9 @@
     # Step 3(a): Index the raw profile.
     % llvm-profdata merge -sparse foo.profraw -o foo.profdata
 
+For an example of merging multiple profiles created by testing,
+see the LLVM `coverage build script <https://github.com/llvm/llvm-zorg/blob/main/zorg/jenkins/jobs/jobs/llvm-coverage>`_.
+
 There are multiple different ways to render coverage reports. The simplest
 option is to generate a line-oriented report:
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to