A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Nov 24 12:38: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: 24913k
Peak memory use before GGC: 9599k
Peak memory use after GGC: 8946k
Maximum of released memory in single GGC run: 2736k
Garbage: 40102k
Leak: 6709k
Overhead: 5790k
GGC runs: 317
comparing combine.c compilation at -O1 level:
Overall memory needed: 26824k
Peak memory use before GGC: 17367k
Peak memory use after GGC: 17184k
Maximum of released memory in single GGC run: 2372k
Garbage: 60655k
Leak: 6892k
Overhead: 7581k
GGC runs: 386
comparing combine.c compilation at -O2 level:
Overall memory needed: 26824k
Peak memory use before GGC: 17370k
Peak memory use after GGC: 17184k
Maximum of released memory in single GGC run: 2453k
Garbage: 77410k -> 77414k
Leak: 6977k
Overhead: 10023k -> 10024k
GGC runs: 455
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7034k to 7050k, overall 0.23%
Overall memory needed: 26824k
Peak memory use before GGC: 18368k
Peak memory use after GGC: 17999k
Maximum of released memory in single GGC run: 3509k
Garbage: 107819k -> 107822k
Leak: 7034k -> 7050k
Overhead: 13566k -> 13566k
GGC runs: 508
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80928k
Peak memory use before GGC: 69473k
Peak memory use after GGC: 45011k
Maximum of released memory in single GGC run: 36247k
Garbage: 146440k
Leak: 10101k
Overhead: 19797k
GGC runs: 251
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 111720k
Peak memory use before GGC: 94043k
Peak memory use after GGC: 83560k
Maximum of released memory in single GGC run: 32588k
Garbage: 289921k
Leak: 10079k
Overhead: 36686k
GGC runs: 244
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 127168k
Peak memory use before GGC: 113357k
Peak memory use after GGC: 83476k
Maximum of released memory in single GGC run: 32177k
Garbage: 372235k -> 372235k
Leak: 10180k
Overhead: 48199k -> 48199k
GGC runs: 272
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 127212k
Peak memory use before GGC: 113381k
Peak memory use after GGC: 83498k
Maximum of released memory in single GGC run: 32501k
Garbage: 372851k -> 372851k
Leak: 10185k
Overhead: 48354k -> 48354k
GGC runs: 276
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118392k
Peak memory use before GGC: 95141k
Peak memory use after GGC: 94193k
Maximum of released memory in single GGC run: 20460k
Garbage: 223586k
Leak: 49201k
Overhead: 36726k
GGC runs: 369
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105500k
Peak memory use before GGC: 95270k
Peak memory use after GGC: 93195k
Maximum of released memory in single GGC run: 20343k
Garbage: 566560k
Leak: 55069k
Overhead: 67513k
GGC runs: 515
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 106396k -> 106424k
Peak memory use before GGC: 95270k
Peak memory use after GGC: 93196k
Maximum of released memory in single GGC run: 20342k
Garbage: 651124k -> 651112k
Leak: 55828k -> 55841k
Overhead: 78842k -> 78849k
GGC runs: 585 -> 586
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108816k -> 108812k
Peak memory use before GGC: 96738k
Peak memory use after GGC: 94273k
Maximum of released memory in single GGC run: 20839k
Garbage: 707211k -> 707224k
Leak: 57038k -> 57042k
Overhead: 83856k -> 83859k
GGC runs: 596 -> 594
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-11-24 01:09:56.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-11-24 11:28:00.000000000 +0000
@@ -1,3 +1,54 @@
+2005-11-24 Richard Guenther <rguenther@suse.de>
+ Dirk Mueller <dmueller@suse.de>
+
+ PR c++/14024
+ * c-common.h (strict_aliasing_warning): Declare.
+ * c-common.c (strict_aliasing_warning): New function,
+ split out from ...
+ * c-typeck.c (build_c_cast): ... here.
+
+2005-11-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * optabs.c (expand_binop): Use swap_commutative_operands_with_target
+ to order operands.
+ (swap_commutative_operands_with_target): New.
+
+2005-11-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * gcse.c (hash_scan_set): Look through REG_EQUAL or REG_EQUIV notes
+ also when doing PRE, rather than only for global CPROP.
+
+2005-11-24 Ben Elliston <bje@au.ibm.com>
+
+ * machmode.h (CLASS_HAS_WIDER_MODES_P): New macro.
+ * optabs.c (expand_binop): Use CLASS_HAS_WIDER_MODES_P, improve
+ formatting.
+ (expand_twoval_unop): Likewise.
+ (widen_clz): Likewise.
+ (expand_parity): Likewise.
+ (expand_unop): Likewise.
+ (emit_cmp_and_jmp_insn_1): Likewise.
+ (prepare_float_lib_cmp): Likewise.
+
+2005-11-24 Ben Elliston <bje@au.ibm.com>
+
+ * optabs.c (prepare_cmp_insn): Use SCALAR_FLOAT_MODE_P.
+ Remove unused `class' variable.
+
+2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR c++/21667
+ * c-typeck.c (build_array_ref): Avoid code duplicate. Use common
+ C/C++ diagnostic function warn_array_subscript_with_type_char.
+ * c-common.h (warn_array_subscript_with_type_char): Declare.
+ * c-common.c (warn_array_subscript_with_type_char): Define.
+
+2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR c/21668
+ * c-decl.c (grokdeclarator): Don't warn for 'extern const' when
+ compiling at the intersection of C and C++.
+
2005-11-23 Mark Mitchell <mark@codesourcery.com>
* doc/invoke.texi: For man pages, include gcc-vers.texi.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-11-22 18:15:51.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-11-24 11:28:00.000000000 +0000
@@ -1,3 +1,22 @@
+2005-11-24 Richard Guenther <rguenther@suse.de>
+ Dirk Mueller <dmueller@suse.de>
+
+ PR c++/14024
+ * typeck.c (build_reinterpret_cast_1): Use
+ strict_aliasing_warning.
+
+2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR c++/24235
+ * pt.c (check_instantiated_args): Reword diagnostic message about
+ template argument involving local types.
+
+2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR c++/21667
+ * typeck.c (build_array_ref): Avoid code duplicate. Use common
+ C/C++ diagnostic function warn_array_subscript_with_type_char.
+
2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/22238
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