1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/include/llvm/ProfileData
Pirama Arumuga Nainar 7b5dc69f32 [CoverageMapping] Handle gaps in counter IDs for source-based coverage
For source-based coverage, the frontend sets the counter IDs and the
constraints of counter IDs is not defined.  For e.g., the Rust frontend
until recently had a reserved counter #0
(https://github.com/rust-lang/rust/pull/83774).  Rust coverage
instrumentation also creates counters on edges in addition to basic
blocks.  Some functions may have more counters than regions.

This breaks an assumption in CoverageMapping.cpp where the number of
counters in a function is assumed to be bounded by the number of
regions:
  Counts.assign(Record.MappingRegions.size(), 0);

This assumption causes CounterMappingContext::evaluate() to fail since
there are not enough counter values created in the above call to
`Counts.assign`.  Consequently, some uncovered functions are not
reported in coverage reports.

This change walks a Function's CoverageMappingRecord to find the maximum
counter ID, and uses it to initialize the counter array when instrprof
records are missing for a function in sparse profiles.

Differential Revision: https://reviews.llvm.org/D101780
2021-05-19 10:46:38 -07:00
..
Coverage [CoverageMapping] Handle gaps in counter IDs for source-based coverage 2021-05-19 10:46:38 -07:00
GCOV.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
InstrProf.h [SampleFDO] Do not scale the magic number NOMORE_ICP_MAGICNUM in value profile 2021-03-29 09:34:37 -07:00
InstrProfData.inc Port D97640 to llvm/include/llvm/ProfileData/InstrProfData.inc 2021-03-19 16:24:16 -07:00
InstrProfReader.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
InstrProfWriter.h [llvm-profdata] Emit Error when Invalid MemOpSize Section is Created by llvm-profdata 2021-02-23 12:51:54 -08:00
ProfileCommon.h [CSSPGO][llvm-profdata] Support trimming cold context when merging profiles 2021-04-22 00:42:37 -07:00
SampleProf.h [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling 2021-04-10 12:39:10 -07:00
SampleProfReader.h [CSSPGO] Add attribute metadata for context profile 2021-03-18 22:00:56 -07:00
SampleProfWriter.h [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling 2021-04-10 12:39:10 -07:00