A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Jun 30 09:10: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: 24908k -> 24912k
Peak memory use before GGC: 9717k
Peak memory use after GGC: 9064k
Maximum of released memory in single GGC run: 2815k
Garbage: 42300k -> 42296k
Leak: 6721k -> 6720k
Overhead: 5842k -> 5839k
GGC runs: 335
comparing combine.c compilation at -O1 level:
Overall memory needed: 24376k
Peak memory use before GGC: 17735k
Peak memory use after GGC: 17517k
Maximum of released memory in single GGC run: 2363k -> 2467k
Garbage: 67685k -> 67687k
Leak: 7033k -> 7033k
Overhead: 8420k -> 8419k
GGC runs: 416
comparing combine.c compilation at -O2 level:
Overall memory needed: 24372k
Peak memory use before GGC: 17743k -> 17742k
Peak memory use after GGC: 17518k -> 17517k
Maximum of released memory in single GGC run: 2512k -> 2615k
Garbage: 86964k -> 86966k
Leak: 7214k -> 7214k
Overhead: 11156k -> 11156k
GGC runs: 478
comparing combine.c compilation at -O3 level:
Overall memory needed: 24880k -> 24884k
Peak memory use before GGC: 17990k -> 17965k
Peak memory use after GGC: 17578k -> 17552k
Maximum of released memory in single GGC run: 3437k -> 3438k
Garbage: 115875k -> 115915k
Leak: 7305k -> 7289k
Overhead: 14967k -> 14965k
GGC runs: 537 -> 535
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 83372k
Peak memory use before GGC: 71655k
Peak memory use after GGC: 45752k
Maximum of released memory in single GGC run: 37689k
Garbage: 151627k -> 151626k
Leak: 11561k -> 11560k
Overhead: 18883k -> 18882k
GGC runs: 267
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 116992k -> 117020k
Peak memory use before GGC: 99596k -> 99598k
Peak memory use after GGC: 89003k -> 89016k
Maximum of released memory in single GGC run: 33389k
Garbage: 296983k -> 296995k
Leak: 11434k -> 11427k
Overhead: 36876k -> 36875k
GGC runs: 290
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 157104k -> 157100k
Peak memory use before GGC: 118682k
Peak memory use after GGC: 88992k
Maximum of released memory in single GGC run: 33523k
Garbage: 391578k -> 391585k
Leak: 11523k -> 11516k
Overhead: 48978k -> 48977k
GGC runs: 329
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 157088k -> 157084k
Peak memory use before GGC: 118684k
Peak memory use after GGC: 88994k
Maximum of released memory in single GGC run: 33523k
Garbage: 392386k -> 392390k
Leak: 11532k -> 11530k
Overhead: 49101k -> 49100k
GGC runs: 335
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 124868k -> 124856k
Peak memory use before GGC: 100729k -> 100707k
Peak memory use after GGC: 99725k -> 99710k
Maximum of released memory in single GGC run: 21556k -> 21559k
Garbage: 230059k -> 229924k
Leak: 53186k -> 53152k
Overhead: 40063k -> 39919k
GGC runs: 335
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 439133k to 444332k, overall 1.18%
Overall memory needed: 107368k -> 107348k
Peak memory use before GGC: 99640k -> 99619k
Peak memory use after GGC: 98650k -> 98632k
Maximum of released memory in single GGC run: 20173k -> 20167k
Garbage: 439133k -> 444332k
Leak: 55220k -> 55140k
Overhead: 63147k -> 63711k
GGC runs: 471 -> 472
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 495446k to 500602k, overall 1.04%
Overall memory needed: 107376k -> 107356k
Peak memory use before GGC: 99640k -> 99619k
Peak memory use after GGC: 98651k -> 98632k
Maximum of released memory in single GGC run: 20173k -> 20166k
Garbage: 495446k -> 500602k
Leak: 55858k -> 55793k
Overhead: 72718k -> 73276k
GGC runs: 517 -> 520
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 100838k to 101139k, overall 0.30%
Peak amount of GGC memory still allocated after garbage collectin increased from 99839k to 100133k, overall 0.29%
Amount of produced GGC garbage increased from 508375k to 513778k, overall 1.06%
Overall memory needed: 112172k -> 112768k
Peak memory use before GGC: 100838k -> 101139k
Peak memory use after GGC: 99839k -> 100133k
Maximum of released memory in single GGC run: 20573k -> 20625k
Garbage: 508375k -> 513778k
Leak: 56151k -> 56058k
Overhead: 73625k -> 74210k
GGC runs: 511 -> 510
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-06-29 22:57:46.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-06-30 08:04:23.000000000 +0000
@@ -1,3 +1,34 @@
+2005-06-30 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.md (addv2hi3, subv2hi3, sminv2hi3, smaxv2hi3,
+ mulv2hi3, negv2hi2, absv2hi2): Pattern names fixed by appending the
+ necessary digit.
+
+2005-06-29 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (rs6000_file_start): Use PPC405_ERRATUM77.
+
+2005-06-29 Diego Novillo <dnovillo@redhat.com>
+
+ PR 22234
+ * tree-ssa-copy.c (fini_copy_prop): Do not overwrite copy_of
+ when following copy-of chains.
+
+2005-06-30 Jan Hubicka <jh@suse.cz>
+
+ * function.h (struct function): Add saved blocks/unexpanded var list.
+ * gimple-low.c (record_vars): Insert only VAR_DECLs.
+ * tree-inline.c (add_lexical_block): Declare; do not clear sublocks.
+ (remap_decl): Do not declare vars.
+ (remap_block): Do not care inserting blocks.
+ (remap_blocks): New function.
+ (copy_body_r): Update debug info.
+ (expand_call_inline): Duplicate callee block tree into caller;
+ copy all the unexpanded_var_list.
+ (save_body): Save unexpanded_var_list and blocks.
+ * tree-optimize.c (tree_rest_of_optimization): Restore
+ blocks/unexpanded_var_list.
+
2005-06-29 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c (ia64_expand_vecint_minmax): Use us_minus and
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