A recent patch increased GCC's memory consumption!

gcctest@suse.de gcctest@suse.de
Fri Nov 18 12:16:00 GMT 2005


Hi,

I am a friendly script caring about memory consumption in GCC.  Please
contact jh@suse.cz if something is going wrong.

Comparing memory consumption on compilation of combine.i, insn-attrtab.i,
and generate-3.4.ii I got:


comparing combine.c compilation at -O0 level:
    Overall memory needed: 24905k -> 24909k
    Peak memory use before GGC: 9595k
    Peak memory use after GGC: 8942k
    Maximum of released memory in single GGC run: 2737k
    Garbage: 40099k
    Leak: 6705k
    Overhead: 5788k
    GGC runs: 317

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26820k
    Peak memory use before GGC: 17364k
    Peak memory use after GGC: 17180k
    Maximum of released memory in single GGC run: 2372k
    Garbage: 60618k -> 60638k
    Leak: 6888k
    Overhead: 7578k -> 7579k
    GGC runs: 387

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26820k
    Peak memory use before GGC: 17367k
    Peak memory use after GGC: 17180k
    Maximum of released memory in single GGC run: 2452k
    Garbage: 77388k -> 77414k
    Leak: 6973k
    Overhead: 10022k -> 10023k
    GGC runs: 456

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 7030k to 7046k, overall 0.23%
    Overall memory needed: 26820k
    Peak memory use before GGC: 18365k
    Peak memory use after GGC: 17995k
    Maximum of released memory in single GGC run: 3510k
    Garbage: 107793k -> 107815k
    Leak: 7030k -> 7046k
    Overhead: 13563k -> 13564k
    GGC runs: 509

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 80924k
    Peak memory use before GGC: 69469k
    Peak memory use after GGC: 45007k
    Maximum of released memory in single GGC run: 36247k
    Garbage: 146623k
    Leak: 9856k
    Overhead: 19791k
    GGC runs: 252

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 111696k
    Peak memory use before GGC: 94037k
    Peak memory use after GGC: 83553k
    Maximum of released memory in single GGC run: 32589k
    Garbage: 289765k -> 289761k
    Leak: 10072k
    Overhead: 36663k -> 36663k
    GGC runs: 245

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 127120k -> 127116k
    Peak memory use before GGC: 113347k
    Peak memory use after GGC: 83466k
    Maximum of released memory in single GGC run: 32177k
    Garbage: 372181k -> 372180k
    Leak: 10176k
    Overhead: 48194k -> 48194k
    GGC runs: 273

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 127188k
    Peak memory use before GGC: 113377k
    Peak memory use after GGC: 83496k
    Maximum of released memory in single GGC run: 32501k -> 32500k
    Garbage: 372762k -> 372777k
    Leak: 10181k -> 10181k
    Overhead: 48348k -> 48349k
    GGC runs: 276

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118380k
    Peak memory use before GGC: 95138k
    Peak memory use after GGC: 94190k
    Maximum of released memory in single GGC run: 20460k
    Garbage: 223559k
    Leak: 49198k
    Overhead: 36725k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 105796k -> 105772k
    Peak memory use before GGC: 95267k
    Peak memory use after GGC: 93193k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 567631k -> 567650k
    Leak: 55030k -> 55015k
    Overhead: 67667k -> 67668k
    GGC runs: 518

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106304k -> 106288k
    Peak memory use before GGC: 95268k
    Peak memory use after GGC: 93193k
    Maximum of released memory in single GGC run: 20344k
    Garbage: 653958k -> 653987k
    Leak: 55807k -> 55806k
    Overhead: 79247k -> 79257k
    GGC runs: 585

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 108896k -> 108836k
    Peak memory use before GGC: 96736k
    Peak memory use after GGC: 94271k
    Maximum of released memory in single GGC run: 20840k
    Garbage: 708770k -> 708855k
    Leak: 56981k -> 56975k
    Overhead: 84217k -> 84273k
    GGC runs: 597

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-11-18 05:29:37.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-11-18 11:05:37.000000000 +0000
@@ -1,3 +1,18 @@
+2005-11-18  Zdenek Dvorak  <dvorakz@suse.cz>
+
+	PR rtl-optimization/24497
+	* loop-unroll.c (apply_opt_in_copies): Do not verify equality of
+	the copied insn.
+
+2005-11-18  Zdenek Dvorak  <dvorakz@suse.cz>
+
+	* tree-scalar-evolution.c (expression_expensive_p): New function.
+	(scev_const_prop): Use compute_overall_effect_of_inner_loop.
+
+2005-11-18  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* config/bfin/crtlibid.s: New file.
+
 2005-11-17  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 	PR target/24348


The results can be reproduced by building a compiler with

--enable-gather-detailed-mem-stats targetting x86-64

and compiling preprocessed combine.c or testcase from PR8632 with:

-fmem-report --param=ggc-min-heapsize=1024 --param=ggc-min-expand=1 -Ox -Q

The memory consumption summary appears in the dump after detailed listing
of the places they are allocated in.  Peak memory consumption is actually
computed by looking for maximal value in {GC XXXX -> YYYY} report.

Your testing script.



More information about the Gcc-regression mailing list