Gcov parallel usage question

Nathan Sidwell nathan@codesourcery.com
Mon Nov 7 14:17:00 GMT 2005


Lee Moore wrote:
> Hi Nathan,
> 
> I hope you don't mind me contacting you directly, but I saw a posting 
> you made regarding gcov.
> Do you know if it is OK to run programs instrumented with gcov in 
> parallel ?

gcov instrumentation is multi-process safe, but not multi-thread safe.  The 
multi-processing safety relies on OS level file locking, which is not available 
on some systems.

> 
> My suspicion is this may cause a problem, basically for regression 
> testing purposes I need to run the same program many times, but I have 
> seen messages to the effect of "Invocation mismatch ...", followed by 
> references to the .gcda files.
> 
> If it is not possible to run in parallel, is there an 'hack' to perform 
> merges of .gcda files or anything like that you are aware of ?

gcov itself merges data.


nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc-help mailing list