fix c++ gc problems following t_r_o_c

Geoff Keating geoffk@geoffk.org
Thu Sep 4 22:43:00 GMT 2003


> X-Original-To: geoffk@foam.wonderslug.com
> Date: Thu, 4 Sep 2003 00:29:06 -0400 (EDT)
> From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
> Cc: gcc-patches@gcc.gnu.org, geoffk@geoffk.org
> X-OriginalArrivalTime: 04 Sep 2003 08:16:18.0377 (UTC) FILETIME=[D1157B90:01C372BC]
> 
>  > On Wed, Sep 03, 2003 at 04:27:28PM -0700, Geoff Keating wrote:
>  > > Maybe we should have a 'gcsc', GC Sometimes Collect, which can be on
>  > > by default in enable-checking builds and doesn't cost quite so much as
>  > > gcac.
>  > 
>  > That'd be nice.
>  > r~
> 
> I don't know that we need a separate setting.  If you can live without
> it the following patch should do the trick.  The patch causes GCC to
> default to the gcc-3.2.x collection values (i.e. 30% min-expand and
> 4Mb min-heap) when 'gc' checking is enabled, and this setting is
> already "on" by default on mainline.

I'm not not so sure about this patch.  It'll mean that sometimes, we
have a bug that can never happen in a regular --enable-checking build,
but can happen to end-users using a released GCC together with a
specific hardware configuration.

> 2003-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
> 
> 	* ggc-common.c (init_ggc_heuristics): Don't use the heuristics
> 	when checking is enabled.
> 
> diff -rup orig/egcc-CVS20030903/gcc/ggc-common.c egcc-CVS20030903/gcc/ggc-common.c
> --- orig/egcc-CVS20030903/gcc/ggc-common.c	2003-08-22 20:01:11.000000000 -0400
> +++ egcc-CVS20030903/gcc/ggc-common.c	2003-09-03 23:49:30.987484619 -0400
> @@ -753,7 +753,7 @@ ggc_min_heapsize_heuristic (void)
>  void
>  init_ggc_heuristics (void)
>  {
> -#ifndef ENABLE_GC_ALWAYS_COLLECT
> +#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
>    set_param_value ("ggc-min-expand", ggc_min_expand_heuristic());
>    set_param_value ("ggc-min-heapsize", ggc_min_heapsize_heuristic());
>  #endif
> 


-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list