Lines Matching refs:coverage
14 LLVM's code coverage mapping format is used to provide code coverage
18 This document is aimed at those who would like to know how LLVM's code coverage
21 LLVM to provide code coverage analysis for their own programs, see the `Clang
24 We start by briefly describing LLVM's code coverage mapping format and the
25 way that Clang and LLVM's code coverage tool work with this format. After
26 the basics are down, more advanced features of the coverage mapping format
33 LLVM's code coverage mapping format is designed to be a self contained
36 to store the data that is required for a code coverage tool to map between
40 The mapping data is used in two places in the code coverage process:
51 After that, the tool is able to generate various code coverage reports
54 The coverage mapping format aims to be a "universal format" that would be
56 provide the frontend the possibility of generating the minimal coverage mapping
66 coverage mapping format works.
68 The coverage mapping format operates on a per-function level as the
70 For each function that requires code coverage, the frontend has to create
71 coverage mapping data that can map between the source code ranges and
77 The function's coverage mapping data contains an array of mapping regions.
79 the `file id <coverage file id_>`_, the `coverage mapping counter`_ and
83 * Code regions associate portions of source code and `coverage mapping
85 by the code coverage tool to compute the execution counts for lines,
87 the various code coverage statistics for a function.
102 `coverage mapping counters`_, as the frontend knows that they are never
103 executed. They are used by the code coverage tool to mark the skipped lines
116 used by the code coverage tool to find the mapping regions that are created
118 expanded file id. They don't associate with `coverage mapping counters`_,
119 as the code coverage tool can determine the execution count for this region
130 with a `coverage mapping counter`_ to track how many times an individual
131 condition evaluated to 'true' and another `coverage mapping counter`_ to
181 A coverage mapping counter can represents a reference to the profile
187 coverage mapping counters or other expressions.
205 Finally, a coverage mapping counter can also represent an execution count of
206 of zero. The zero counter is used to provide coverage mapping for
215 The zero counters allow the code coverage tool to display proper line execution
221 code and refer to two coverage mapping counters, one to track the number of
228 The coverage mapping data is stored in the LLVM IR using a global constant
245 The coverage mapping variable generated by Clang has 2 fields:
263 …In prior versions, the length of the affixed string that contains the encoded coverage mapping data
290 unit) reduces size bloat in the coverage mapping data. As part of this
292 function record, instead of being affixed to the coverage header.
305 i32 9, ; Function's encoded coverage mapping data string length
315 i32 9, ; Function's encoded coverage mapping data string length
321 The coverage mapping header has the following fields:
323 * The number of function records affixed to the coverage header. Always 0, but present for backward…
327 …f *__llvm_coverage_mapping* that contains any encoded coverage mapping data affixed to the coverag…
350 IR for the `coverage mapping sample`_ that was shown earlier:
353 coverage mapping data for the sample translation unit:
368 * The coverage mapping from the first function record is encoded in this string:
385 …| ``0x01`` | The coverage mapping counter for the first region in this function. The value of 1 te…
397 * The length of the substring that contains the encoded coverage mapping data
401 * The two trailing bytes are zeroes and are used to pad the coverage mapping
407 The per-function coverage mapping data is encoded as a stream of bytes,
418 `types <cvmtypes_>`_ as the per-function coverage mapping data, with the
457 File id mapping in a function's coverage mapping stream
465 A `coverage mapping counter`_ is stored in a single `LEB value <LEB128_>`_.