• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xd009642 / llvm-profparser / #242
73%

Build:
DEFAULT BRANCH: master
Ran 10 Aug 2026 07:02AM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Aug 2026 06:58AM UTC coverage: 73.436% (+0.4%) from 73.042%
#242

push

web-flow
Support LLVM 23 raw profile format (version 11) (#82)

* Support LLVM 23 raw profile format (version 11)

LLVM 23 bumped INSTR_PROF_RAW_VERSION to 11 and changed two structures, so v11
.profraw files are misparsed. The visible symptom is a `Nom(Satisfy)` parser
failure preceded by "consistency check for reading counts failed".

Three changes are needed, and the third is easy to miss:

1. The raw header gains three uint64 fields before NamesSize:
   NumUniformCounters, PaddingBytesAfterUniformCounters, UniformCountersDelta.
   Without reading them, every later field is off by 24 bytes -- notably
   counters_delta, which read_raw_counts uses for offset arithmetic, which is
   what trips the consistency check.

2. The per-function ProfileData record gains UniformCounterPtr (after
   CounterPtr) and OffloadDeviceWaveSize (a uint16 after NumValueSites[]).

3. The struct tail padding MOVED. In v9/v10 ProfileData ends on a 4-byte field
   at offset 60 so C pads to 64 -- which is what the existing `take(4)` in
   parse_bytes compensates for (answering its "TODO WHAT AM I MISSING HERE?":
   it is struct tail padding). In v11 OffloadDeviceWaveSize pushes
   NumBitmapBytes to offset 68, the struct ends at 72 which is already
   8-aligned, so there is no tail padding and the 2 padding bytes move INSIDE
   the struct instead. Taking 4 there as well over-consumes and desynchronises
   every record after the first.

Verified end to end against a real v11 profraw from rustc 1.99.0-nightly
(LLVM 23.1.0): the header and both ProfileData records now decode correctly,
and `cargo tarpaulin --engine llvm` reports 100.00% coverage, 1/1 lines on a
one-function crate -- matching what the ptrace engine independently reports.

Refs #81

* Skip the uniform counter section, and add LLVM 23 test vectors

Addresses the review feedback on #82.

The header change alone was not enough. compiler-rt writes the body as data,
PaddingBytesBeforeCounters, counters, PaddingBytesAfterCounters... (continued)

33 of 36 new or added lines in 1 file covered. (91.67%)

1150 of 1566 relevant lines covered (73.44%)

2123.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
81.0
1.41% src/instrumentation_profile/raw_profile.rs
Jobs
ID Job ID Ran Files Coverage
1 #242.1 10 Aug 2026 07:02AM UTC 14
73.44
Source Files on build #242
  • Tree
  • List 14
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 38b9b1da on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc