[PATCH] gcov: Configurable destination for error output

Aaron Conole aconole@redhat.com
Tue Feb 23 16:04:00 GMT 2016

Nathan Sidwell <nathan@codesourcery.com> writes:

> On 02/22/16 14:35, Aaron Conole wrote:
>> D'oh, you're probably right. In my excitement to contribute, I forgot
>> this was shared. I think 'w' should be correct, since this isn't
>> intended to be read at all, but I could be convinced otherwise.
> sorry, I misremembered the encoding of write append, which is "a" --
> don't clobber the existing contents.  I think that's the usual
> behaviour for error logging (.xsession-error and the like).


>> By lazy load, do you mean only after the first gcov_error call? That's
>> probably a better approach, and I can recook, test, and resubmit with
>> these corrected.
> Lazy opening -- open on first error output.   Something like
> if (!gcov_error_file)
>   gcov_error_file = gcov_open_error_file ();
> in gcov_error?

Before I start cooking up this change, is it possible I need to worry about
gcov_error being invoked from multiple threads? If so, I'll need some
kind of mutex which I think is not needed with the current design.

> FWIW, I think this has missed the boat for gcc 6.1, as we're now in stage  4.

No worries.


> nathan

More information about the Gcc-patches mailing list