public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/47618] Collecting multiple profiles and using all for PGO
Date: Sun, 22 Jul 2012 10:23:00 -0000	[thread overview]
Message-ID: <bug-47618-4-DL5TOE2bdR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47618-4@http.gcc.gnu.org/bugzilla/>

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.


  parent reply	other threads:[~2012-07-22 10:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06  0:28 [Bug gcov-profile/47618] New: " roland at rschulz dot eu
2012-07-21 23:57 ` [Bug gcov-profile/47618] " steven at gcc dot gnu.org
2012-07-22  0:42 ` pinskia at gcc dot gnu.org
2012-07-22  6:56 ` xunxun1982 at gmail dot com
2012-07-22  7:07 ` pinskia at gcc dot gnu.org
2012-07-22 10:23 ` steven at gcc dot gnu.org [this message]
2012-07-22 10:46 ` steven at gcc dot gnu.org
2012-07-24 22:13 ` pinskia at gcc dot gnu.org
2012-07-24 23:20 ` pinskia at gcc dot gnu.org
2012-07-24 23:52 ` roland at rschulz dot eu
2012-07-25  0:05 ` pinskia at gcc dot gnu.org
2012-07-25  0:50 ` roland at rschulz dot eu
2012-07-25  8:25 ` steven at gcc dot gnu.org
2022-01-06 18:56 ` ygribov at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47618-4-DL5TOE2bdR@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).