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!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Sun, 04 Feb 2007 17:38:16 +0000
- Subject: A recent patch increased 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 empty function compilation at -O0 level:
Overall memory needed: 7384k -> 7383k
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: 7400k -> 7399k
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: 7496k -> 7495k
Peak memory use before GGC: 2264k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 309k
Garbage: 450k
Leak: 2291k
Overhead: 456k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 7508k -> 7507k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 453k
Leak: 2291k
Overhead: 457k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7508k -> 7507k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 453k
Leak: 2291k
Overhead: 457k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 17820k -> 17819k
Peak memory use before GGC: 9327k
Peak memory use after GGC: 8890k
Maximum of released memory in single GGC run: 2633k
Garbage: 37259k
Leak: 6538k
Overhead: 4655k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 19724k -> 19727k
Peak memory use before GGC: 10916k
Peak memory use after GGC: 10550k
Maximum of released memory in single GGC run: 2393k
Garbage: 37829k
Leak: 9414k
Overhead: 5358k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory allocated via mmap and sbrk increased from 34284k to 35299k, overall 2.96%
Overall memory needed: 34284k -> 35299k
Peak memory use before GGC: 19563k
Peak memory use after GGC: 19361k
Maximum of released memory in single GGC run: 2216k
Garbage: 58406k -> 58407k
Leak: 6562k
Overhead: 6164k -> 6164k
GGC runs: 355 -> 356
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 6673k to 6681k, overall 0.12%
Overall memory needed: 37720k -> 37707k
Peak memory use before GGC: 19568k
Peak memory use after GGC: 19374k
Maximum of released memory in single GGC run: 2208k
Garbage: 70382k -> 70384k
Leak: 6673k -> 6681k
Overhead: 7821k -> 7821k
GGC runs: 409
comparing combine.c compilation at -O3 level:
Overall memory needed: 46048k -> 46039k
Peak memory use before GGC: 20747k -> 20766k
Peak memory use after GGC: 19861k -> 19876k
Maximum of released memory in single GGC run: 3168k -> 3154k
Garbage: 105054k -> 105050k
Leak: 6817k -> 6817k
Overhead: 12214k -> 12211k
GGC runs: 460 -> 461
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 104600k -> 104599k
Peak memory use before GGC: 70356k
Peak memory use after GGC: 45188k
Maximum of released memory in single GGC run: 37701k
Garbage: 131161k
Leak: 9581k
Overhead: 15666k
GGC runs: 206
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 106132k -> 106131k
Peak memory use before GGC: 71518k
Peak memory use after GGC: 46456k
Maximum of released memory in single GGC run: 37702k
Garbage: 132317k
Leak: 11271k
Overhead: 16060k
GGC runs: 206
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 149904k -> 147935k
Peak memory use before GGC: 86800k
Peak memory use after GGC: 80983k
Maximum of released memory in single GGC run: 33275k
Garbage: 269604k
Leak: 9398k
Overhead: 27282k
GGC runs: 226
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 196724k -> 192311k
Peak memory use before GGC: 88116k
Peak memory use after GGC: 81051k
Maximum of released memory in single GGC run: 31604k
Garbage: 304746k
Leak: 9395k
Overhead: 32895k
GGC runs: 246
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 196732k -> 196751k
Peak memory use before GGC: 88129k -> 88130k
Peak memory use after GGC: 81063k -> 81064k
Maximum of released memory in single GGC run: 31676k -> 31674k
Garbage: 305458k -> 305458k
Leak: 9397k -> 9400k
Overhead: 33096k -> 33096k
GGC runs: 246
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 151659k -> 151647k
Peak memory use before GGC: 92636k
Peak memory use after GGC: 91719k
Maximum of released memory in single GGC run: 18923k
Garbage: 209437k
Leak: 49262k
Overhead: 21554k
GGC runs: 409
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 169811k -> 169783k
Peak memory use before GGC: 105259k
Peak memory use after GGC: 104216k
Maximum of released memory in single GGC run: 19099k
Garbage: 216065k
Leak: 72687k
Overhead: 27476k
GGC runs: 383
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory allocated via mmap and sbrk increased from 138972k to 145156k, overall 4.45%
Peak amount of GGC memory allocated before garbage collecting increased from 101671k to 103343k, overall 1.64%
Peak amount of GGC memory still allocated after garbage collecting increased from 100643k to 102259k, overall 1.61%
Amount of produced GGC garbage increased from 391780k to 393904k, overall 0.54%
Overall memory needed: 138972k -> 145156k
Peak memory use before GGC: 101671k -> 103343k
Peak memory use after GGC: 100643k -> 102259k
Maximum of released memory in single GGC run: 18091k -> 18066k
Garbage: 391780k -> 393904k
Leak: 50177k -> 50086k
Overhead: 30049k -> 30256k
GGC runs: 538 -> 549
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 139716k to 146216k, overall 4.65%
Peak amount of GGC memory allocated before garbage collecting increased from 101963k to 103721k, overall 1.72%
Peak amount of GGC memory still allocated after garbage collecting increased from 100953k to 102694k, overall 1.72%
Amount of produced GGC garbage increased from 432851k to 434398k, overall 0.36%
Overall memory needed: 139716k -> 146216k
Peak memory use before GGC: 101963k -> 103721k
Peak memory use after GGC: 100953k -> 102694k
Maximum of released memory in single GGC run: 18079k -> 18061k
Garbage: 432851k -> 434398k
Leak: 51253k -> 50775k
Overhead: 35243k -> 35395k
GGC runs: 587 -> 601
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory allocated via mmap and sbrk increased from 145476k to 149404k, overall 2.70%
Peak amount of GGC memory allocated before garbage collecting increased from 103579k to 104990k, overall 1.36%
Peak amount of GGC memory still allocated after garbage collecting increased from 102548k to 103914k, overall 1.33%
Amount of produced GGC garbage increased from 455110k to 456007k, overall 0.20%
Overall memory needed: 145476k -> 149404k
Peak memory use before GGC: 103579k -> 104990k
Peak memory use after GGC: 102548k -> 103914k
Maximum of released memory in single GGC run: 18477k -> 18492k
Garbage: 455110k -> 456007k
Leak: 51509k -> 50863k
Overhead: 36575k -> 37019k
GGC runs: 602 -> 611
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 246463k
Peak memory use before GGC: 82632k
Peak memory use after GGC: 59515k
Maximum of released memory in single GGC run: 45585k
Garbage: 148104k
Leak: 8082k
Overhead: 24864k
GGC runs: 80
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 247351k
Peak memory use before GGC: 83278k
Peak memory use after GGC: 60161k
Maximum of released memory in single GGC run: 45230k
Garbage: 148323k
Leak: 9338k
Overhead: 25359k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 260948k -> 260479k
Peak memory use before GGC: 104834k
Peak memory use after GGC: 102619k -> 101620k
Maximum of released memory in single GGC run: 53718k -> 51846k
Garbage: 241495k -> 241495k
Leak: 25176k
Overhead: 28735k -> 28735k
GGC runs: 79
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 532100k -> 532207k
Peak memory use before GGC: 104828k
Peak memory use after GGC: 102614k -> 101615k
Maximum of released memory in single GGC run: 37189k
Garbage: 273333k -> 273333k
Leak: 25605k
Overhead: 34774k -> 34774k
GGC runs: 91
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1183340k -> 1183243k
Peak memory use before GGC: 201488k
Peak memory use after GGC: 189830k
Maximum of released memory in single GGC run: 80890k
Garbage: 373285k
Leak: 45260k
Overhead: 46802k
GGC runs: 70
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-02-04 00:25:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-02-04 15:56:44.000000000 +0000
@@ -1,3 +1,68 @@
+2007-02-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/30636
+ * fold-const.c (try_move_mult_to_index): Make sure to not
+ overflow one dimension of a multi-dimensional array access.
+
+2007-02-04 Jan Hubicka <jh@suse.cz>
+
+ * passes.c (init_optimization_passes): Reindent.
+
+2007-02-04 Jan Hubicka <jh@suse.cz>
+ Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * tree-optimize.c (has_abnormal_outgoing_edge_p): Move to tree-inline.
+ (execute_fixup_cfg): Break out the abnormal goto code.
+ * tree-inline.c (has_abnormal_outgoing_edge_p): Move here from
+ tree-optimize.c.
+ (make_nonlocal_label_edges): Move here from execute_fixup_cfg.
+ (optimize_inline_calls): Call make_nonlocal_label_edges.
+
+2007-02-04 Jan Hubicka <jh@suse.cz>
+
+ * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Return
+ true when something was changed.
+ (rename_ssa_copies): When something was changed, do
+ TODO_remove_unused_locals.
+ * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_value):
+ add TODO_remove_unused_locals when instruction was removed.
+
+2007-02-04 Jan Hubicka <jh@suse.cz>
+
+ * ipa-inline.c (try_inline): Improve debug output; work on already
+ inline edges too.
+ (cgraph_decide_inlining_incrementally): Indent; improve debug output;
+ call try_inline for already inlined edges too when flattening;
+ inline also functions that make callee growth but overall unit size
+ reduce.
+
+2007-02-04 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/m32c/bitops.md, config/m32c/jump.md,
+ config/m32c/m32c.c, config/m32c/m32c.h, config/m32r/m32r.c,
+ config/m32r/m32r.h, config/m32r/m32r.md,
+ config/m32r/predicates.md, config/m68hc11/larith.asm,
+ config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
+ config/m68k/m68k.h, config/mcore/mcore.md, config/mips/4k.md,
+ config/mips/mips-protos.h, config/mips/mips.c,
+ config/mips/mips.h, config/mips/mips.md, config/mips/mips16.S,
+ config/mn10300/mn10300.h, config/mn10300/predicates.md,
+ config/mt/mt.c, config/mt/mt.h, config/mt/mt.md: Follow
+ spelling conventions.
+
+ * config/v850/v850.c, config/v850/v850.h, config/v850/v850.md:
+ Follow spelling conventions.
+
+2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
+
+ * c-opts.c (c_common_post_options): If C++0x mode is enabled, don't
+ warn about C++0x compatibility.
+
+2007-02-04 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/h8300/h8300.c, config/h8300/h8300.h,
+ config/h8300/h8300.md: Follow spelling conventions.
+
2007-02-03 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/30667
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-02-02 20:14:41.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-02-04 15:56:43.000000000 +0000
@@ -1,3 +1,21 @@
+2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
+
+2007-02-04 Kazu Hirata <kazu@codesourcery.com>
+
+ * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
+ parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
+
+2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
+
+ * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
+ keyword warning to -Wc++0x-compat.
+
+2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * decl.c (grokdeclarator): Update documentation.
+
2007-02-02 Jakub Jelinek <jakub@redhat.com>
PR c++/30536
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.