http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47618

--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-07-22 
10:23:37 UTC ---
(In reply to comment #3)
> (In reply to comment #1)
> > A tool to merge multiple gcda files shoulnd't be very difficult to write. I
> > don't think this should be done by the compiler itself, that would greatly
> > complicate things. But a separate tool, gcov-merge say, would work, and this
> > isn't a big job to create using libgcov (and gcov-dump as an example). You'd
> > also be able to merge profile information from different directories.
> > 
> > Would something like the above work for you?
> 
> But for VC and Intel Compiler
> 
> they can auto merge all PGO information.
> 
> Will we make gcc to have the similar behavior?

xunxun,

GCC does merge profile information from different runs into one gcda file. It
works differently from ICC in that ICC produces one .dyn file per test run and
uses prof_merge to generate merge multiple .dyn files into a summary file. GCC
does this merging from multiple runs automatically.

What GCC does not do, is merge multiple gcda files (which would be the
equivalent of merging multiple pgopti.dpi files with ICC).

The issue in this problem report, is that with MPI there will be multiple
images of the same program running simultaneously. The different images can't
share the same set of gcda files (you'd have races) so each image generates its
own set of gcda files. For that, a new merge tool is necessary.

Ideally, this tool would also run transparently. One way to do this could be to
take multiple arguments for -fprofile-dir and merge profile info from each
directory.

Reply via email to