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: Sun, 17 Jul 2005 21:08:10 +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: 24745k
Peak memory use before GGC: 9582k
Peak memory use after GGC: 8930k
Maximum of released memory in single GGC run: 2754k
Garbage: 41308k
Leak: 6696k
Overhead: 5810k
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: 2421k
Garbage: 66319k
Leak: 7186k
Overhead: 7709k
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: 84713k
Leak: 7426k
Overhead: 10258k
GGC runs: 483
comparing combine.c compilation at -O3 level:
Ovarall memory allocated via mmap and sbrk decreased from 29020k to 27992k, overall -3.67%
Peak amount of GGC memory allocated before garbage collecting run decreased from 20366k to 18803k, overall -8.31%
Amount of produced GGC garbage decreased from 133347k to 127897k, overall -4.26%
Overall memory needed: 29020k -> 27992k
Peak memory use before GGC: 20366k -> 18803k
Peak memory use after GGC: 17170k
Maximum of released memory in single GGC run: 5821k -> 5454k
Garbage: 133347k -> 127897k
Leak: 8017k -> 7819k
Overhead: 15967k -> 14858k
GGC runs: 538 -> 534
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: 149911k
Leak: 11332k
Overhead: 19105k
GGC runs: 254
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114108k
Peak memory use before GGC: 96264k
Peak memory use after GGC: 85585k
Maximum of released memory in single GGC run: 32777k
Garbage: 295366k
Leak: 11556k
Overhead: 35957k
GGC runs: 251
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 125220k
Peak memory use before GGC: 115314k
Peak memory use after GGC: 85553k
Maximum of released memory in single GGC run: 32461k
Garbage: 381539k
Leak: 11670k
Overhead: 47771k
GGC runs: 279
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 125236k
Peak memory use before GGC: 115335k
Peak memory use after GGC: 85574k
Maximum of released memory in single GGC run: 32788k -> 32787k
Garbage: 382215k -> 382195k
Leak: 11693k -> 11692k
Overhead: 47932k -> 47930k
GGC runs: 282 -> 281
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118632k
Peak memory use before GGC: 95340k
Peak memory use after GGC: 94393k
Maximum of released memory in single GGC run: 20159k
Garbage: 224311k
Leak: 49424k
Overhead: 36947k
GGC runs: 340
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 106072k
Peak memory use before GGC: 94843k
Peak memory use after GGC: 93892k
Maximum of released memory in single GGC run: 19796k
Garbage: 597088k
Leak: 55690k
Overhead: 69288k
GGC runs: 520
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 106064k
Peak memory use before GGC: 94843k
Peak memory use after GGC: 93893k
Maximum of released memory in single GGC run: 19796k
Garbage: 679803k
Leak: 56627k
Overhead: 80498k
GGC runs: 584
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108464k
Peak memory use before GGC: 95603k
Peak memory use after GGC: 94656k
Maximum of released memory in single GGC run: 19694k
Garbage: 726345k
Leak: 56846k
Overhead: 84354k
GGC runs: 592
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-07-17 05:53:31.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-07-17 20:02:49.000000000 +0000
@@ -1,3 +1,18 @@
+2005-07-17 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-promote-statics.c (pass_promote_statics): Change dump file
+ name.
+
+2005-07-17 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-optimize.c (init_tree_optimization_passes): Add
+ pass_eliminate_useless_stores pass.
+ * tree-pass.h (pass_eliminate_useless_stores): New pass structure.
+ * tree-ssa-pre.c (is_copy_stmt): New function.
+ (follow_copies_till_vuse): Ditto.
+ (do_eustores): Ditto.
+ (gate_eustores): Ditto.
+
2005-07-16 Richard Henderson <rth@redhat.com>
* gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit.
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.