Skip to content

Read the gcda of a merged gcno in parallel - #1523

Open
michieldwitte wants to merge 1 commit into
mozilla:masterfrom
michieldwitte:pr/parallel-gcda
Open

michieldwitte wants to merge 1 commit into
mozilla:masterfrom
michieldwitte:pr/parallel-gcda

Conversation

@michieldwitte

Copy link
Copy Markdown

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant