This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add working-set size and hotness information to fdo summary (issue6465057)
On Mon, Aug 20, 2012 at 8:35 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Mon, Aug 20, 2012 at 11:48 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>> The summary merging in coverage.c confuses me a bit as it seems to be
>>> handling the case when there are multiple program summaries in a
>>> single gcda file. When would this happen? It looks like the merge
>>> handling in libgcov should always produce a single program summary per
>>> gcda file.
>
> AFAIU it merges existing profile data with new profile data from a
> second (or third, or ...) trial run.
It looks like libgcov will always merge program summaries between
different runs though. As far as I can tell, it will always either
rewrite the whole gcda file with a single merged program summary, or
abort the write if the merge was not successful. However, the comment
above gcov_exit does talk about keeping program summaries separate for
object files contained in different programs, which is what Honza was
describing as the motivation for the coverage.c merging. But I don't
see where multiple program summaries ever get written to the same gcda
file - if the checksums are different it seems to abort the write. But
the code in coverage.c is dealing with a single gcda file containing
multiple program summaries. Is there code somewhere that will cause
this to happen?
Thanks,
Teresa
>
> Ciao!
> Steven
--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413