This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcov: Configurable destination for error output
- From: Aaron Conole <aconole at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Nathan Sidwell <nathan at acm dot org>, <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 23 Feb 2016 11:04:00 -0500
- Subject: Re: [PATCH] gcov: Configurable destination for error output
- Authentication-results: sourceware.org; auth=none
- References: <1456160612-25123-1-git-send-email-aconole at bytheb dot org> <56CB42FE dot 1020608 at acm dot org> <f7t7fhwwr7h dot fsf at redhat dot com> <56CB5E6B dot 5000609 at acm dot org> <f7th9h01qty dot fsf at bytheb dot org> <56CB663B dot 6050001 at codesourcery dot com>
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).
Done.
>> 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.
-Aaron
> nathan