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

Issue 5541046: Merged r183086 and r183143 from branches/google/gcc-4_6 into branches/google/gcc-4_6-mobile

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by asharif1
Modified:
12 years, 3 months ago
CC:
gcc-patches_gcc.gnu.org, bjanakiraman_google.com
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile/
Visibility:
Public.

Description

This merges in r183086 and r183143 from from branches/google/gcc-4_6 into branches/google/gcc-4_6-mobile. The original patch descriptions: r183143: 2012-01-12 Rong Xu <xur@google.com> Backport r183142 from google/main * gcc/profile.c (compute_value_histograms): ignore the histrogram when the counters not found in gcda file. r183086: 2012-01-10 Rong Xu <xur@google.com> Backport r183081 from google/main * gcc/profile.c (compute_value_histograms): handle the case when INDIR_CALL counters not available in gcda files. This fixes an ICE in the compiler when building with -fprofile-use. The ICE was caused by a segfault when trying to read counters for a certain function in Chrome. The patch fixes the ICE by checking the counter pointer and skipping over it if it is NULL.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -1 line) Patch
M . View 0 chunks +0 lines, -0 lines 0 comments Download
M gcc/ChangeLog.google-4_6 View 1 chunk +13 lines, -0 lines 0 comments Download
M gcc/profile.c View 2 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 4
asharif1
This merges in the fix for ICE when using PGO when building Chrome.
12 years, 3 months ago (2012-01-12 23:16:03 UTC) #1
asharif1
On 2012/01/12 23:16:03, asharif1 wrote: > This merges in the fix for ICE when using ...
12 years, 3 months ago (2012-01-12 23:32:33 UTC) #2
asharif1
Please take a look.
12 years, 3 months ago (2012-01-13 00:46:42 UTC) #3
shenhan
12 years, 3 months ago (2012-01-13 17:47:01 UTC) #4
LGTM

On Thu, Jan 12, 2012 at 3:16 PM, <asharif@google.com> wrote:
>
> Reviewers: xur, shenhan, jingyu,
>
> Message:
> This merges in the fix for ICE when using PGO when building Chrome.
>
>
>
> Please review this at http://codereview.appspot.com/5541046/
>
> Affected files:
>   M    .
>  M     gcc/ChangeLog.google-4_6
>  M     gcc/profile.c
>
>
> Index: .
> ===================================================================
> --- .   (revision 183143)
> +++ .   (working copy)
>
> Property changes on: .
> ___________________________________________________________________
> Modified: svn:mergeinfo
>   Merged /branches/google/gcc-4_6:r183086,183143
> Index: gcc/ChangeLog.google-4_6
> ===================================================================
> --- gcc/ChangeLog.google-4_6    (revision 183143)
> +++ gcc/ChangeLog.google-4_6    (working copy)
> @@ -1,3 +1,16 @@
> +2012-01-12   Rong Xu  <xur@google.com>
> +       Backport r183142 from google/main
> +
> +       * gcc/profile.c (compute_value_histograms): ignore the
> +       histrogram when the counters not found in gcda file.
> +
> +2012-01-10  Rong Xu  <xur@google.com>
> +
> +       Backport r183081 from google/main
> +
> +       * gcc/profile.c (compute_value_histograms): handle the
> +       case when INDIR_CALL counters not available in gcda files.
> +
>  2011-12-19  Han Shen  <shenhan@google.com>
>        Add a new option "-fstack-protector-strong".
>        * cfgexpand.c (expand_used_vars): Add logic handling
> Index: gcc/profile.c
> ===================================================================
> --- gcc/profile.c       (revision 183143)
> +++ gcc/profile.c       (working copy)
> @@ -790,9 +790,14 @@
>   gcov_type *histogram_counts[GCOV_N_VALUE_COUNTERS];
>   gcov_type *act_count[GCOV_N_VALUE_COUNTERS];
>   gcov_type *aact_count;
> +  bool warned[GCOV_N_VALUE_COUNTERS];
> +  static const char *const ctr_names[] = GCOV_COUNTER_NAMES;
>
>   for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++)
> -    n_histogram_counters[t] = 0;
> +    {
> +      n_histogram_counters[t] = 0;
> +      warned[t] = 0;
> +    }
>
>   for (i = 0; i < VEC_length (histogram_value, values); i++)
>     {
> @@ -828,6 +833,19 @@
>       t = (int) hist->type;
>
>       aact_count = act_count[t];
> +      /* If cannot find the counters in gcda file, skip and give
> +         a warning.  */
> +      if (aact_count == 0)
> +        {
> +          if (!warned[t] && flag_opt_info >= OPT_INFO_MIN)
> +            warning (0, "cannot find %s counters in function %s.",
> +                     ctr_names[COUNTER_FOR_HIST_TYPE(t)],
> +                     IDENTIFIER_POINTER (
> +                       DECL_ASSEMBLER_NAME (current_function_decl)));
> +          hist->n_counters = 0;
> +          warned[t] = true;
> +          continue;
> +        }
>       act_count[t] += hist->n_counters;
>
>       gimple_add_histogram_value (cfun, stmt, hist);
>
>
Sign in to reply to this message.

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