thanks for the fix. It works fine for me.

David

On Sat, Jun 23, 2012 at 11:00 AM, Nathan Sidwell <nat...@acm.org> wrote:
> This patch changes the coverage unlinking to be less aggressive.  As David
> pointed out, when experimenting with random optimization options along side
> -fuse-coverage and -frandom-seed, it is inconvenient for gcc to remove the
> coverage data file.  The reason it was doing so, is because -frandom-seed
> prevents a unique stamp being placed in the coverage data to distinguish
> execution of the newly optimized program from execution of the older
> incarnation of it.  libgcov would get confused and give errors about
> mismatched function checksums.
>
> This patch tweaks things.  With -fuse-coverage we read in the coverage data
> file and its stamp.  We can feed that stamp into the stamp to be used for
> the output coverage data, and hence effectively distinguish generations of
> coverage data even when -frandom-seed prevents randomness.  We also don't
> need to delete the data file if we're not producing coverage data for the
> new compilation.
>
> Manual testing shows this patch is preventing deletion of the data file in
> the circumstances I understand David's using.  David, care to try this patch
> out to see if it resolves your use case?
>
> The changes to tree.c merely extend the crc32 code to allow it to generate a
> crc from a 32-bit unsigned, in addition to the byte variant already present.
>
> testing on i686-pc-linux-gnu shows no regressions.
>
> nathan

Reply via email to