Read the gcda of a merged gcno in parallel - #1523
Open
michieldwitte wants to merge 1 commit into
Open
michieldwitte wants to merge 1 commit into
michieldwitte wants to merge 1 commit into
Conversation
Merging many runs into one gcno leaves the single producer thread reading one gcda per run, which starves the parsing threads: 501 translation units over 174 runs spent 1.06s reading 87k gcda, and varying --threads from 1 to 16 made no difference at all. Read them with rayon when the archives are plain directories, and stop opening every file found while walking a directory, since only gcno, info, dat, xml and out are ever sniffed. The same 681 MB of gcda now takes 0.64s. Size rayon's global pool from --threads, so that the reads stay within the thread budget that was asked for instead of always spanning every core. This makes the path rewriting and the profraw aggregation honour it too, as both were using the global pool as well. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
michieldwitte
force-pushed
the
pr/parallel-gcda
branch
from
September 9, 2026 10:24
a7cd3a2 to
be65a22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging many runs into one gcno leaves the single producer thread reading one gcda per run, which starves the parsing threads: 501 translation units over 174 runs spent 1.06s reading 87k gcda, and varying --threads from 1 to 16 made no difference at all.
Read them with rayon when the archives are plain directories, and stop opening every file found while walking a directory, since only gcno, info, dat, xml and out are ever sniffed. The same 681 MB of gcda now takes 0.64s.
Size rayon's global pool from --threads, so that the reads stay within the thread budget that was asked for instead of always spanning every core. This makes the path rewriting and the profraw aggregation honour it too, as both were using the global pool as well.