https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95348
--- Comment #28 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Qing Zhao from comment #26)
> > --- Comment #25 from Martin Liška <marxin at gcc dot gnu.org> ---
> >> I will try to get more data on our real application.
> >>
> >> one question: why not just delete the entire records whose counter is zero
> >> and delete the entire file whose counter is zero?
> >
> > Because we need to distinguish in between situations where a function was
> > really not executed (counter == 0) and the situation where we miss profile
> > for
> > a function.
> Understood. However, is it possible to just provide an option for the user
> to choose
> to just delete all the zero records and files in order to save more space?
It can be possible to add option for that, yes. To be honest, I don't have much
time to work on that right now.
And you still haven't replied to my essential question: Why can't you merge
profiles into one directory during run? Or at least merge to a reasonable
number of folders that you'll merge later?
Note that you can use -fprofile-dir=path with:
%q{VAR}
value of environment variable VAR
which can be used to multiplex into multiple folders for concurrent processes.
> >
> > How exactly do you merge profiles? Do you run parallel invocation which can
> > take log2(N)?
> We run serial merge adding one at a time right now.
> Is it possible for gcov-merge to add a new functionality to automatically
> merge complete
> Set of subdirectories?
One would need to run it in multiple threads and I've made a Python script
prototype:
https://github.com/marxin/script-misc/blob/master/gcov-merge-parallel.py
So yes, current GCOV streaming is far from being optimal, but with a small
tweaks we can make it working for your scenario..