On 08/10/16 06:43, Martin Liška wrote:
Hello.
There are multiple PRs (mentioned in ChangeLog) which suffer from missing
capability of gcov
to save counters for functions with constructor/destructor attributes. I done
that by simply
replacing atexit handler (gcov_exit) with a new static destructor
(__gcov_exit), which has
priority 99 (I did the same for __gcov_init). However, I'm not sure whether
it's possible
that a ctor defined in a source file can be potentially executed before
__gcov_init (w/ the default
priority)?
Patch survives:
make check -k -j10 RUNTESTFLAGS="gcov.exp"
make check -k -j10 RUNTESTFLAGS="tree-prof.exp"
I've just also verified that a DSO gcov dump works as before. I'm attaching a
test-case which
tests both static ctors/dtors, as well as C++ ctors/dtors.
Does a coverage bootstrap (--enable-coverage) still succeed?
I think this is a good idea, but we should document the changed behavior. (I
don't think the current behaviour's documented).
nathan