A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Tue Jul 19 01:41: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:
Amount of produced GGC garbage increased from 41308k to 41358k, overall 0.12%
Overall memory needed: 24765k -> 24633k
Peak memory use before GGC: 9582k -> 9586k
Peak memory use after GGC: 8930k -> 8934k
Maximum of released memory in single GGC run: 2754k
Garbage: 41308k -> 41358k
Leak: 6696k
Overhead: 5810k -> 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: 2421k -> 2402k
Garbage: 66319k -> 66339k
Leak: 7186k
Overhead: 7709k -> 7744k
GGC runs: 415 -> 417
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 -> 84729k
Leak: 7426k
Overhead: 10258k -> 10293k
GGC runs: 483
comparing combine.c compilation at -O3 level:
Overall memory needed: 27992k
Peak memory use before GGC: 18803k
Peak memory use after GGC: 17170k
Maximum of released memory in single GGC run: 5454k
Garbage: 127897k
Leak: 7819k
Overhead: 14858k
GGC runs: 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 -> 149918k
Leak: 11332k
Overhead: 19105k -> 19106k
GGC runs: 254
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114504k -> 114104k
Peak memory use before GGC: 96264k
Peak memory use after GGC: 85585k
Maximum of released memory in single GGC run: 32777k
Garbage: 295366k -> 295368k
Leak: 11556k
Overhead: 35957k -> 36054k
GGC runs: 251
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 125220k
Peak memory use before GGC: 115314k -> 115312k
Peak memory use after GGC: 85553k -> 85551k
Maximum of released memory in single GGC run: 32461k
Garbage: 381539k
Leak: 11670k
Overhead: 47771k -> 47864k
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: 32787k
Garbage: 382195k
Leak: 11692k
Overhead: 47930k
GGC runs: 281
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118632k -> 118624k
Peak memory use before GGC: 95340k -> 95333k
Peak memory use after GGC: 94393k -> 94386k
Maximum of released memory in single GGC run: 20159k -> 20160k
Garbage: 224311k -> 224282k
Leak: 49424k -> 49424k
Overhead: 36947k -> 36953k
GGC runs: 340 -> 341
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 -> 597266k
Leak: 55690k -> 55674k
Overhead: 69288k -> 69424k
GGC runs: 520 -> 521
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 -> 679915k
Leak: 56627k -> 56611k
Overhead: 80498k -> 80632k
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-18 10:18:11.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-07-19 00:36:12.000000000 +0000
@@ -1,3 +1,18 @@
+2005-07-18 Ian Lance Taylor <ian@airs.com>
+
+ PR middle-end/22057
+ * tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder
+ blocks when optimizing.
+
+2005-07-18 Steve Ellcey <sje@cup.hp.com>
+
+ * common.opt (frename-registers): Initialize to 2.
+ (fweb): Ditto.
+ (fgcse-after-reload): Ditto.
+ * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE.
+ (process_options): Only change flag_web, flag_rename_registers,
+ and flag_rerun_cse_after_loop if not explicitly set by user.
+
2005-07-18 Jan Beulich <jbeulich@novell.com>
* config/i386/i386.c (ix86_expand_branch, ix86_expand_setcc,
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