Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(626)

Issue 6501100: [PATCH] Fix part of PR gcov-profile/54487

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by tejohnson
Modified:
9 years, 8 months ago
Reviewers:
hubicka
CC:
markus_trippelsdorf.de, hjl.tools_gmail.com, gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/trunk/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M libgcc/libgcov.c View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 2
tejohnson
This fixes part of the issue described in PR gcov-profile/54487 where there were warnings about ...
11 years, 8 months ago (2012-09-07 05:51:18 UTC) #1
hubicka_ucw.cz
11 years, 8 months ago (2012-09-07 10:55:27 UTC) #2
> This fixes part of the issue described in PR gcov-profile/54487 where
> there were warnings about mismatches due to slight differences in the
> merged histograms in different object files. This can happen due to
> the truncating integer division in the merge routine, which could result
> in slightly different histograms when summaries are merged in different
> orders.
> 
> Tested with bootstrap and profiledbootstrap on x86_64-unknown-linux-gnu.
> Ok for trunk?

OK,
thanks!
Honza
> 
> Teresa
> 
> 2012-09-06  Teresa Johnson  <tejohnson@google.com>
> 
>         PR gcov-profile/54487
> 	* libgcc/libgcov.c (gcov_exit): Avoid warning on histogram
>         differences.
> 
> Index: libgcc/libgcov.c
> ===================================================================
> --- libgcc/libgcov.c	(revision 191035)
> +++ libgcc/libgcov.c	(working copy)
> @@ -707,7 +707,13 @@ gcov_exit (void)
>  	    memcpy (cs_all, cs_prg, sizeof (*cs_all));
>  	  else if (!all_prg.checksum
>  		   && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
> -		   && memcmp (cs_all, cs_prg, sizeof (*cs_all)))
> +                   /* Don't compare the histograms, which may have slight
> +                      variations depending on the order they were updated
> +                      due to the truncating integer divides used in the
> +                      merge.  */
> +                   && memcmp (cs_all, cs_prg,
> +                              sizeof (*cs_all) - (sizeof (gcov_bucket_type)
> +                                                  * GCOV_HISTOGRAM_SIZE)))
>  	    {
>  	      fprintf (stderr, "profiling:%s:Invocation mismatch - some data files
may have been removed%s\n",
>  		       gi_filename, GCOV_LOCKED
> 
> --
> This patch is available for review at http://codereview.appspot.com/6501100
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b