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 in some cases!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Thu, 25 Jan 2007 18:53:21 +0000
- Subject: A recent patch increased GCC's memory consumption in some cases!
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 empty function compilation at -O0 level:
Overall memory needed: 7380k
Peak memory use before GGC: 2264k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 309k
Garbage: 444k
Leak: 2289k
Overhead: 456k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7396k
Peak memory use before GGC: 2292k
Peak memory use after GGC: 1982k
Maximum of released memory in single GGC run: 310k
Garbage: 447k
Leak: 2321k
Overhead: 460k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7492k
Peak memory use before GGC: 2264k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 309k
Garbage: 451k
Leak: 2291k
Overhead: 456k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 7504k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 454k
Leak: 2291k
Overhead: 457k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7504k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 454k
Leak: 2291k
Overhead: 457k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 17616k
Peak memory use before GGC: 9322k
Peak memory use after GGC: 8885k
Maximum of released memory in single GGC run: 2627k
Garbage: 37251k
Leak: 6539k
Overhead: 4643k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 19704k
Peak memory use before GGC: 10916k
Peak memory use after GGC: 10545k
Maximum of released memory in single GGC run: 2388k
Garbage: 37851k
Leak: 9415k
Overhead: 5346k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory needed: 33000k
Peak memory use before GGC: 19645k
Peak memory use after GGC: 19446k
Maximum of released memory in single GGC run: 2261k
Garbage: 54612k
Leak: 6569k
Overhead: 9667k
GGC runs: 352
comparing combine.c compilation at -O2 level:
Overall memory needed: 36512k
Peak memory use before GGC: 19650k
Peak memory use after GGC: 19454k
Maximum of released memory in single GGC run: 2203k
Garbage: 70393k
Leak: 6681k
Overhead: 11478k
GGC runs: 410
comparing combine.c compilation at -O3 level:
Overall memory needed: 47452k
Peak memory use before GGC: 20775k
Peak memory use after GGC: 19929k
Maximum of released memory in single GGC run: 3163k
Garbage: 103575k
Leak: 6763k
Overhead: 16318k
GGC runs: 462
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 104736k
Peak memory use before GGC: 70357k
Peak memory use after GGC: 45189k
Maximum of released memory in single GGC run: 37701k
Garbage: 131189k
Leak: 9580k
Overhead: 15666k
GGC runs: 208
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 106120k
Peak memory use before GGC: 71519k
Peak memory use after GGC: 46457k
Maximum of released memory in single GGC run: 37702k
Garbage: 132350k
Leak: 11270k
Overhead: 16060k
GGC runs: 206
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 123876k -> 123868k
Peak memory use before GGC: 71508k
Peak memory use after GGC: 67853k
Maximum of released memory in single GGC run: 31661k
Garbage: 227099k
Leak: 9400k
Overhead: 28095k
GGC runs: 224
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 192136k -> 192128k
Peak memory use before GGC: 78337k
Peak memory use after GGC: 72716k
Maximum of released memory in single GGC run: 30526k
Garbage: 278147k
Leak: 9397k
Overhead: 34350k
GGC runs: 246
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 192136k -> 192156k
Peak memory use before GGC: 78349k
Peak memory use after GGC: 72729k
Maximum of released memory in single GGC run: 30596k
Garbage: 278874k
Leak: 9399k
Overhead: 34560k
GGC runs: 246
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 151628k -> 151631k
Peak memory use before GGC: 92618k
Peak memory use after GGC: 91701k
Maximum of released memory in single GGC run: 18916k
Garbage: 209166k
Leak: 49262k
Overhead: 21473k
GGC runs: 409
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 169728k -> 169711k
Peak memory use before GGC: 105241k
Peak memory use after GGC: 104198k
Maximum of released memory in single GGC run: 19093k
Garbage: 215792k
Leak: 72687k
Overhead: 27396k
GGC runs: 383
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage decreased from 437485k to 390934k, overall -11.91%
Overall memory needed: 137348k
Peak memory use before GGC: 99218k -> 98365k
Peak memory use after GGC: 98235k -> 97363k
Maximum of released memory in single GGC run: 18086k
Garbage: 437485k -> 390934k
Leak: 50849k -> 50528k
Overhead: 62412k -> 51993k
GGC runs: 575 -> 543
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage decreased from 509752k to 446268k, overall -14.23%
Overall memory needed: 139200k
Peak memory use before GGC: 99295k -> 98404k
Peak memory use after GGC: 98301k -> 97429k
Maximum of released memory in single GGC run: 18077k
Garbage: 509752k -> 446268k
Leak: 51734k -> 51291k
Overhead: 55642k -> 46947k
GGC runs: 638 -> 593
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 98659k to 100102k, overall 1.46%
Peak amount of GGC memory still allocated after garbage collectin increased from 97682k to 99104k, overall 1.46%
Amount of produced GGC garbage increased from 291162k to 469034k, overall 61.09%
Overall memory needed: 141860k
Peak memory use before GGC: 98659k -> 100102k
Peak memory use after GGC: 97682k -> 99104k
Maximum of released memory in single GGC run: 18473k
Garbage: 291162k -> 469034k
Leak: 52086k -> 51434k
Overhead: 27133k -> 47553k
GGC runs: 494 -> 607
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 246456k
Peak memory use before GGC: 82632k
Peak memory use after GGC: 59512k
Maximum of released memory in single GGC run: 45582k
Garbage: 148107k
Leak: 8083k
Overhead: 24863k
GGC runs: 80
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 247352k -> 247348k
Peak memory use before GGC: 83278k
Peak memory use after GGC: 60158k
Maximum of released memory in single GGC run: 45231k
Garbage: 148382k
Leak: 9338k
Overhead: 25359k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting run decreased from 215829k to 201002k, overall -7.38%
Peak amount of GGC memory still allocated after garbage collecting decreased from 207547k to 189198k, overall -9.70%
Amount of produced GGC garbage decreased from 290574k to 275765k, overall -5.37%
Amount of memory still referenced at the end of compilation decreased from 32943k to 30235k, overall -8.96%
Overall memory needed: 329208k -> 329304k
Peak memory use before GGC: 215829k -> 201002k
Peak memory use after GGC: 207547k -> 189198k
Maximum of released memory in single GGC run: 140082k -> 135346k
Garbage: 290574k -> 275765k
Leak: 32943k -> 30235k
Overhead: 32591k -> 31268k
GGC runs: 74
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting run decreased from 365845k to 319046k, overall -14.67%
Peak amount of GGC memory still allocated after garbage collectin increased from 119689k to 189193k, overall 58.07%
Amount of memory still referenced at the end of compilation increased from 13413k to 30664k, overall 128.60%
Overall memory needed: 303620k -> 303636k
Peak memory use before GGC: 365845k -> 319046k
Peak memory use after GGC: 119689k -> 189193k
Maximum of released memory in single GGC run: 306846k -> 255677k
Garbage: 616505k -> 606140k
Leak: 13413k -> 30664k
Overhead: 106831k -> 97140k
GGC runs: 102 -> 83
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1412064k -> 1412096k
Peak memory use before GGC: 280855k
Peak memory use after GGC: 273873k
Maximum of released memory in single GGC run: 114236k
Garbage: 446260k
Leak: 50427k
Overhead: 55164k
GGC runs: 74
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-01-25 01:08:12.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-01-25 16:49:18.000000000 +0000
@@ -1,5 +1,54 @@
+2007-01-25 Richard Guenther <rguenther@suse.de>
+
+ * doc/invoke.texi (-Wcoverage-mismatch): Document.
+ * common.opt (-Wcoverage-mismatch): New warning option.
+ * coverage.c (get_coverage_counts): Ignore coverage mismatch
+ if -Wcoverage-mismatch is given.
+
+2007-01-25 Razya Ladelsky <razya@il.ibm.com>
+
+ * ipa-cp.c (ipcp_insert_stage, ipcp_driver): Support for SSA.
+ (ipcp_driver): Change to static definition.
+ Add dumping of the ifunctions.
+ (constant_val_insert): Remove unused parameter. Support for SSA.
+ (ipcp_propagate_const): Support for SSA.
+ (ipcp_profile_bb_print): Print only analyzed nodes.
+ (ipcp_replace_map_create): Remove support for Fortran constant
+ for now.
+ * ipa-prop.c (ipa_method_modify_stmt,
+ ipa_callsite_compute_param): Support for SSA.
+ * ipa-prop.h (ipcp_driver): Remove declaration.
+ (IS_VALID_TREE_MAP_INDEX): Add define.
+
+2007-01-24 Geoffrey Keating <geoffk@apple.com>
+
+ * unwind-dw2.c (execute_stack_op): Handle DW_OP_swap.
+
+2007-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR middle-end/30447
+ * builtins.c (fold_builtin_cabs): Use MPFR to evaluate a
+ constant argument to cabs and do it without checking for
+ -funsafe-math-optimizations.
+
+2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
+
+ * c-common.h (RID_FIRST_CXX0X): New.
+ (RID_LAST_CXX0X): New.
+ * c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
+ by -Wall.
+ * c.opt (Wc++0x-compat): New.
+ * doc/invoke.texi (-Wc++0x-compat): Document.
+
+2007-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (fold_builtin_carg): New.
+ (fold_builtin_1): Use it.
+
2007-01-24 Jan Hubicka <jh@suse.cz>
+ * ipa-inline.c (cgraph_decide_inlining): Initialize initial_insns.
+
* ipa-inline.c (initial_insns, max_insns): Delete.
(compute_max_insns): New function.
(cgraph_decide_inlining_of_small_function): Use it; take minimal amount
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-01-24 05:59:38.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-01-25 16:49:18.000000000 +0000
@@ -1,3 +1,12 @@
+2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
+
+ * lex.c (D_CPP0X): Rename.
+ (D_CXX0X): To this.
+ (reswords): D_CPP0X -> D_CXX0X.
+ (init_reswords): Ditto.
+ * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
+ of C++0x keywords as identifiers.
+
2007-01-23 Simon Martin <simartin@users.sourceforge.net>
PR c++/27492
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.