[PATCH][RFC] Do not stream all zeros for gcda files.
Nathan Sidwell
nathan@acm.org
Wed Jun 17 12:57:35 GMT 2020
On 6/17/20 2:44 AM, Martin Liška wrote:
> Hello.
>
> As mentioned in the PR, gcda files tend to occupy a large disk space
> when each running process streams to its own directory. The test-case
> in the PR has very low coverage and so that the data file contain
> a lot of zero records.
>
> The patch is attempt to not stream these zero COUNTERS:
>
> a-tramp3d-v4.gcda: 01a10000: 38:COUNTERS arcs 19 counts (all zero)
> a-tramp3d-v4.gcda: 0: 0 0 0 0 0 0 0 0
> a-tramp3d-v4.gcda: 8: 0 0 0 0 0 0 0 0
> a-tramp3d-v4.gcda: 16: 0 0 0
>
> Here we stream -19 as count and any of the 0 is streamed.
neat
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> The patch survives PGO bootstrap of GCC and it shrinks size of gcda
> file from 17MB to 12MB.
>
> One alternative approach could be to use a normal compression (zlib, zstd)
> for output file? That can save even more space.
What's the size of zlib (or other) compression of that 17MB file?
nathan
--
Nathan Sidwell
More information about the Gcc-patches
mailing list