@@ -66,17 +66,17 @@ supported. Uninstrumented code simply won't be accounted for in reports.
6666
6767To compile code with Modified Condition/Decision Coverage (MC/DC) enabled,
6868pass ``-fcoverage-mcdc `` in addition to the clang options specified above.
69- MC/DC is an advanced form of code coverage most applicable in the embedded
69+ MC/DC is an advanced form of code coverage most applicable to the embedded
7070space.
7171
7272Running the instrumented program
7373================================
7474
75- The next step is to run the instrumented program. When the program exits it
75+ The next step is to run the instrumented program. When the program exits, it
7676will write a **raw profile ** to the path specified by the ``LLVM_PROFILE_FILE ``
7777environment variable. If that variable does not exist, the profile is written
7878to ``default.profraw `` in the current directory of the program. If
79- ``LLVM_PROFILE_FILE `` contains a path to a non-existent directory, the missing
79+ ``LLVM_PROFILE_FILE `` specifies a path to a non-existent directory, the missing
8080directory structure will be created. Additionally, the following special
8181**pattern strings ** are rewritten:
8282
@@ -97,7 +97,7 @@ directory structure will be created. Additionally, the following special
9797* "%b" expands out to the binary ID (build ID). It can be used with "%Nm" to
9898 avoid binary signature collisions. To use it, the program should be compiled
9999 with the build ID linker option (``--build-id `` for GNU ld or LLD,
100- ``/build-id `` for lld-link on Windows). Linux, Windows and AIX are supported.
100+ ``/build-id `` for lld-link on Windows). Linux, Windows, and AIX are supported.
101101
102102* "%c" expands out to nothing, but enables a mode in which profile counter
103103 updates are continuously synced to a file. This means that if the
@@ -128,7 +128,7 @@ and set bias to the offset between the original and the new counter location,
128128at which point every subsequent counter access will be to the new location,
129129which allows updating profile directly akin to the continuous mode.
130130
131- The advantage of this approach is that doesn't require any special OS support.
131+ The advantage of this approach is that it doesn't require any special OS support.
132132The disadvantage is the extra overhead due to additional instructions required
133133for each counter access (overhead both in terms of binary size and performance)
134134plus duplication of counters (i.e. one copy in the binary itself and another
@@ -137,7 +137,7 @@ other platforms by passing the ``-runtime-counter-relocation`` option to the
137137backend during compilation.
138138
139139For a program such as the `Lit <https://llvm.org/docs/CommandGuide/lit.html >`_
140- testing tool which invokes other programs, it may be necessary to set
140+ testing tool, which invokes other programs, it may be necessary to set
141141``LLVM_PROFILE_FILE `` for each invocation. The pattern strings "%p" or "%Nm"
142142may help to avoid corruption due to concurrency. Note that "%p" is also a Lit
143143token and needs to be escaped as "%%p".
@@ -149,7 +149,7 @@ token and needs to be escaped as "%%p".
149149 Creating coverage reports
150150=========================
151151
152- Raw profiles have to be **indexed ** before they can be used to generate
152+ Raw profiles must be **indexed ** before they can be used to generate
153153coverage reports. This is done using the "merge" tool in ``llvm-profdata ``
154154(which can combine multiple raw profiles and index them at the same time):
155155
@@ -240,13 +240,13 @@ line-oriented report, try:
240240 TOTAL 13 0 100.00% 3 0 100.00% 13 0 100.00% 12 2 83.33%
241241
242242 The ``llvm-cov `` tool supports specifying a custom demangler, writing out
243- reports in a directory structure, and generating html reports. For the full
243+ reports in a directory structure, and generating HTML reports. For the full
244244list of options, please refer to the `command guide
245245<https://llvm.org/docs/CommandGuide/llvm-cov.html> `_.
246246
247247A few final notes:
248248
249- * The ``-sparse `` flag is optional but can result in dramatically smaller
249+ * The ``-sparse `` flag is optional but can produce dramatically smaller
250250 indexed profiles. This option should not be used if the indexed profile will
251251 be reused for PGO.
252252
@@ -255,7 +255,7 @@ A few final notes:
255255 information directly into an existing raw profile on disk. The details are
256256 out of scope.
257257
258- * The ``llvm-profdata `` tool can be used to merge together multiple raw or
258+ * The ``llvm-profdata `` tool can be used to merge multiple raw or
259259 indexed profiles. To combine profiling data from multiple runs of a program,
260260 try e.g:
261261
@@ -299,7 +299,7 @@ There are six statistics tracked in a coverage summary:
299299 source code that may each evaluate to either "true" or "false". These
300300 conditions may comprise larger boolean expressions linked by boolean logical
301301 operators. For example, "x = (y == 2) || (z < 10)" is a boolean expression
302- that is comprised of two individual conditions, each of which evaluates to
302+ comprised of two individual conditions, each of which evaluates to
303303 either true or false, producing four total branch outcomes.
304304
305305* Modified Condition/Decision Coverage (MC/DC) is the percentage of individual
@@ -316,7 +316,7 @@ There are six statistics tracked in a coverage summary:
316316 ``-show-mcdc-summary `` option as long as code was also compiled using the
317317 clang option ``-fcoverage-mcdc ``.
318318
319- * Boolean expressions that are only comprised of one condition (and therefore
319+ * Boolean expressions comprised of only one condition (and therefore
320320 have no logical operators) are not included in MC/DC analysis and are
321321 trivially deducible using branch coverage.
322322
@@ -366,7 +366,7 @@ By default the compiler runtime uses a static initializer to determine the
366366profile output path and to register a writer function. To collect profiles
367367without using static initializers, do this manually:
368368
369- * Export a ``int __llvm_profile_runtime `` symbol from each instrumented shared
369+ * Export an ``int __llvm_profile_runtime `` symbol from each instrumented shared
370370 library and executable. When the linker finds a definition of this symbol, it
371371 knows to skip loading the object which contains the profiling runtime's
372372 static initializer.
@@ -380,7 +380,7 @@ without using static initializers, do this manually:
380380 to ``__llvm_profile_write_file ``.
381381
382382* Forward-declare ``int __llvm_profile_write_file(void) `` and call it to write
383- out a profile. This function returns 0 when it succeeds , and a non-zero value
383+ out a profile. This function returns 0 on success , and a non-zero value
384384 otherwise. Calling this function multiple times appends profile data to an
385385 existing on-disk raw profile.
386386
@@ -418,7 +418,7 @@ Collecting coverage reports for the llvm project
418418================================================
419419
420420To prepare a coverage report for llvm (and any of its sub-projects), add
421- ``-DLLVM_BUILD_INSTRUMENTED_COVERAGE=On `` to the cmake configuration. Raw
421+ ``-DLLVM_BUILD_INSTRUMENTED_COVERAGE=On `` to the CMake configuration. Raw
422422profiles will be written to ``$BUILD_DIR/profiles/ ``. To prepare an html
423423report, run ``llvm/utils/prepare-code-coverage-artifact.py ``.
424424
@@ -429,7 +429,7 @@ To specify an alternate directory for raw profiles, use
429429Drawbacks and limitations
430430=========================
431431
432- * Prior to version 2.26, the GNU binutils BFD linker is not able link programs
432+ * Prior to version 2.26, the GNU binutils BFD linker cannot link programs
433433 compiled with ``-fcoverage-mapping `` in its ``--gc-sections `` mode. Possible
434434 workarounds include disabling ``--gc-sections ``, upgrading to a newer version
435435 of BFD, or using the Gold linker.
0 commit comments