On 6/17/20 2:57 PM, Nathan Sidwell wrote:
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

Yes, but it's just a small portion what can be compressed.



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?

When compression each file separately I get:

zstd: 3.3 MB

$ time zstd *
real    0m0.082s
user    0m0.068s
sys     0m0.013s

gzip: 3.3 MB

$ time gzip *
real    0m0.357s
user    0m0.328s
sys     0m0.029s

Martin


nathan


Reply via email to