This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix c++ gc problems following t_r_o_c
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org, geoffk at geoffk dot org
- Date: Thu, 4 Sep 2003 00:29:06 -0400 (EDT)
- Subject: Re: fix c++ gc problems following t_r_o_c
- References: <20030903233307.GD3779@redhat.com>
> 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.
--Kaveh
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