This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased 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: Thu, 21 Jul 2005 06:08:33 +0000
- Subject: A recent patch increased 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:
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: 148903k
Leak: 9848k
Overhead: 19858k
GGC runs: 251
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 112204k
Peak memory use before GGC: 94382k
Peak memory use after GGC: 83703k
Maximum of released memory in single GGC run: 32776k
Garbage: 294408k
Leak: 10071k
Overhead: 36804k
GGC runs: 250
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 123332k
Peak memory use before GGC: 113428k
Peak memory use after GGC: 83667k
Maximum of released memory in single GGC run: 32461k
Garbage: 380606k
Leak: 10184k
Overhead: 48618k
GGC runs: 279
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 123344k
Peak memory use before GGC: 113453k
Peak memory use after GGC: 83690k
Maximum of released memory in single GGC run: 32774k
Garbage: 381125k
Leak: 10201k
Overhead: 48671k
GGC runs: 282
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of produced GGC garbage increased from 224302k to 227782k, overall 1.55%
Overall memory needed: 118616k -> 118612k
Peak memory use before GGC: 95312k -> 95313k
Peak memory use after GGC: 94369k
Maximum of released memory in single GGC run: 20154k -> 20155k
Garbage: 224302k -> 227782k
Leak: 49416k -> 49416k
Overhead: 36958k -> 37224k
GGC runs: 341 -> 344
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 597248k to 600699k, overall 0.58%
Overall memory needed: 105600k -> 105500k
Peak memory use before GGC: 94268k -> 94269k
Peak memory use after GGC: 93333k
Maximum of released memory in single GGC run: 19336k
Garbage: 597248k -> 600699k
Leak: 55683k -> 55667k
Overhead: 69437k -> 69707k
GGC runs: 520 -> 524
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 679957k to 683449k, overall 0.51%
Overall memory needed: 105612k -> 105520k
Peak memory use before GGC: 94269k
Peak memory use after GGC: 93333k -> 93334k
Maximum of released memory in single GGC run: 19336k
Garbage: 679957k -> 683449k
Leak: 56605k -> 56605k
Overhead: 80697k -> 80966k
GGC runs: 584 -> 589
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 726117k to 729632k, overall 0.48%
Overall memory needed: 108428k -> 108348k
Peak memory use before GGC: 95586k -> 95459k
Peak memory use after GGC: 94639k -> 94513k
Maximum of released memory in single GGC run: 19693k -> 19608k
Garbage: 726117k -> 729632k
Leak: 56836k -> 56837k
Overhead: 84348k -> 84619k
GGC runs: 592 -> 597
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-07-20 06:13:31.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-07-21 05:03:32.000000000 +0000
@@ -1,3 +1,11 @@
+2005-07-20 Douglas Gregor <doug.gregor@gmail.com>
+
+ PR c++/2922
+ * semantics.c (perform_koenig_lookup): For dependent calls, just
+ return the set of functions we've found so far. Later, it will be
+ augmented by those found through argument-dependent lookup.
+ * name-lookup.c (lookup_arg_dependent):
+
2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
Make CONSTRUCTOR use VEC to store initializers.
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.