This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch decreased GCC's memory consumption.
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Wed, 20 Jul 2005 22:58:09 +0000
- Subject: A recent patch decreased GCC's memory consumption.
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: 24769k
Peak memory use before GGC: 9586k
Peak memory use after GGC: 8934k
Maximum of released memory in single GGC run: 2754k
Garbage: 41357k
Leak: 6712k
Overhead: 5818k
GGC runs: 321
comparing combine.c compilation at -O1 level:
Overall memory needed: 26808k
Peak memory use before GGC: 17359k
Peak memory use after GGC: 17170k
Maximum of released memory in single GGC run: 2401k
Garbage: 66313k
Leak: 7186k
Overhead: 7737k
GGC runs: 415
comparing combine.c compilation at -O2 level:
Overall memory needed: 26808k
Peak memory use before GGC: 17360k
Peak memory use after GGC: 17170k
Maximum of released memory in single GGC run: 2503k
Garbage: 84752k
Leak: 7426k
Overhead: 10298k
GGC runs: 482
comparing combine.c compilation at -O3 level:
Overall memory needed: 26808k
Peak memory use before GGC: 17609k
Peak memory use after GGC: 17170k
Maximum of released memory in single GGC run: 3332k
Garbage: 115658k
Leak: 7496k
Overhead: 13503k
GGC runs: 533
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation decreased from 11038k to 9848k, overall -12.08%
Overall memory needed: 81640k
Peak memory use before GGC: 70259k
Peak memory use after GGC: 44999k
Maximum of released memory in single GGC run: 37046k
Garbage: 149921k -> 148903k
Leak: 11038k -> 9848k
Overhead: 19859k -> 19858k
GGC runs: 255 -> 251
comparing insn-attrtab.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation decreased from 11261k to 10071k, overall -11.82%
Overall memory needed: 113400k -> 112204k
Peak memory use before GGC: 95572k -> 94382k
Peak memory use after GGC: 84893k -> 83703k
Maximum of released memory in single GGC run: 32777k -> 32776k
Garbage: 295368k -> 294408k
Leak: 11261k -> 10071k
Overhead: 36806k -> 36804k
GGC runs: 252 -> 250
comparing insn-attrtab.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation decreased from 11374k to 10184k, overall -11.68%
Overall memory needed: 124520k -> 123332k
Peak memory use before GGC: 114614k -> 113428k
Peak memory use after GGC: 84853k -> 83667k
Maximum of released memory in single GGC run: 32461k
Garbage: 381547k -> 380606k
Leak: 11374k -> 10184k
Overhead: 48613k -> 48618k
GGC runs: 281 -> 279
comparing insn-attrtab.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation decreased from 11391k to 10201k, overall -11.67%
Overall memory needed: 124540k -> 123344k
Peak memory use before GGC: 114639k -> 113453k
Peak memory use after GGC: 84878k -> 83690k
Maximum of released memory in single GGC run: 32774k
Garbage: 382063k -> 381125k
Leak: 11391k -> 10201k
Overhead: 48666k -> 48671k
GGC runs: 284 -> 282
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118616k
Peak memory use before GGC: 95312k
Peak memory use after GGC: 94369k
Maximum of released memory in single GGC run: 20154k
Garbage: 224302k
Leak: 49416k
Overhead: 36958k
GGC runs: 341
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105600k
Peak memory use before GGC: 94268k
Peak memory use after GGC: 93333k
Maximum of released memory in single GGC run: 19336k
Garbage: 597248k
Leak: 55683k
Overhead: 69437k
GGC runs: 520
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 105612k
Peak memory use before GGC: 94269k
Peak memory use after GGC: 93333k
Maximum of released memory in single GGC run: 19336k
Garbage: 679957k
Leak: 56605k
Overhead: 80697k
GGC runs: 584
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108428k
Peak memory use before GGC: 95586k
Peak memory use after GGC: 94639k
Maximum of released memory in single GGC run: 19693k
Garbage: 726117k
Leak: 56836k
Overhead: 84348k
GGC runs: 592
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-07-20 20:26:25.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-07-20 21:52:28.000000000 +0000
@@ -1,3 +1,7 @@
+2005-07-20 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * c-typeck.c (output_init_element): Don't copy the INTEGER_CST.
+
2005-07-20 James A. Morrison <phython@gcc.gnu.org>
* tree.h (tree_expr_nonzero_p): Export.
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.