> 2006/7/24, Andrew Pinski <[EMAIL PROTECTED]>: 
 >  > No, GC is just not running as you have too much memory to cause it to
 >  > run with --disable-checking :).
 > 
 > Oh! Now my performance results have totally different interpretation
 > under Linux...
 > Laurynas

There is a way to tweek this manually.  To understand what's going on
with collection heuristics look in ggc-common.c, in there you'll see:

void
init_ggc_heuristics (void)
{
#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
}

So any time both "gc" and "gcac" checking are turned off we alter the
heuristic so that GCC probes the system's RAM and uses more memory
before collecting.  When either of those checking styles are turned on
(as is the case on mainline where "gc" is on) then we default to
smaller values that simulate a machine with less RAM (32MB IIRC) and
collect more often.

In practice this has uncovered collection bugs more reliably.
Developers often have boxes with lots of RAM and their patches would
get tested in situations where no collection was done.  Then when the
patch was installed on mainline someone would see a problem on a small
RAM machine.  With everyone pretending they have small RAM boxes,
developers more often catch GC errors before installing anything.

Anyway, the lower parameters are set with checking on to:
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

You can see this by compiling an actual file with -v.  By that I mean
you have to invoke cc1, not just run "gcc -v" without an input file.
You can add these --params flags to a --disable-checking bootstrap to
restore collection behavior to that found in a checking compiler.

With checking turned off then the parameters depend on the machine's
configuration.  For example on my box with --disable-checking I see:

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

                YMMV,
                --Kaveh

PS: I'm having a problem inbound email and I'm reading the list on the
web archive.  So don't send me private messages or I'll miss them.

--
Kaveh R. Ghazi                  [EMAIL PROTECTED]

Reply via email to