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: Wed, 06 Sep 2006 19:25:19 +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 combine.c compilation at -O0 level:
Overall memory needed: 24781k
Peak memory use before GGC: 8930k
Peak memory use after GGC: 8565k
Maximum of released memory in single GGC run: 2576k
Garbage: 34995k
Leak: 6058k
Overhead: 4736k
GGC runs: 296
comparing combine.c compilation at -O1 level:
Overall memory needed: 36185k
Peak memory use before GGC: 17003k
Peak memory use after GGC: 16831k
Maximum of released memory in single GGC run: 2264k
Garbage: 54876k -> 54915k
Leak: 6071k
Overhead: 5778k -> 5778k
GGC runs: 373 -> 376
comparing combine.c compilation at -O2 level:
Overall memory needed: 26500k
Peak memory use before GGC: 17000k
Peak memory use after GGC: 16831k
Maximum of released memory in single GGC run: 2254k -> 2539k
Garbage: 78603k -> 78583k
Leak: 6179k -> 6173k
Overhead: 8312k -> 8310k
GGC runs: 441
comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 18090k to 18135k, overall 0.25%
Peak amount of GGC memory still allocated after garbage collectin increased from 17427k to 17449k, overall 0.13%
Overall memory needed: 25596k
Peak memory use before GGC: 18090k -> 18135k
Peak memory use after GGC: 17427k -> 17449k
Maximum of released memory in single GGC run: 3325k
Garbage: 107531k -> 107566k
Leak: 6250k
Overhead: 11488k -> 11494k
GGC runs: 487 -> 488
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 83700k
Peak memory use before GGC: 68249k
Peak memory use after GGC: 43997k
Maximum of released memory in single GGC run: 35709k
Garbage: 126249k
Leak: 9118k
Overhead: 16889k
GGC runs: 230
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 103604k -> 103084k
Peak memory use before GGC: 83524k
Peak memory use after GGC: 77617k
Maximum of released memory in single GGC run: 31805k
Garbage: 259630k -> 259632k
Leak: 8930k
Overhead: 28472k -> 28472k
GGC runs: 232
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 105356k -> 105360k
Peak memory use before GGC: 87821k
Peak memory use after GGC: 79916k
Maximum of released memory in single GGC run: 30384k
Garbage: 306132k -> 306132k
Leak: 8935k
Overhead: 35504k -> 35504k
GGC runs: 257
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 105392k -> 105396k
Peak memory use before GGC: 87847k
Peak memory use after GGC: 79943k
Maximum of released memory in single GGC run: 30571k
Garbage: 306723k -> 306724k
Leak: 8938k
Overhead: 35682k -> 35682k
GGC runs: 261
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 116272k
Peak memory use before GGC: 92435k
Peak memory use after GGC: 91514k
Maximum of released memory in single GGC run: 19648k
Garbage: 199817k
Leak: 47214k
Overhead: 20461k
GGC runs: 398
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 115252k
Peak memory use before GGC: 97008k
Peak memory use after GGC: 94817k
Maximum of released memory in single GGC run: 18293k
Garbage: 435942k -> 435939k
Leak: 49027k
Overhead: 31296k -> 31296k
GGC runs: 551
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 115280k
Peak memory use before GGC: 97009k
Peak memory use after GGC: 94817k
Maximum of released memory in single GGC run: 18293k
Garbage: 522665k -> 522679k
Leak: 49742k -> 49742k
Overhead: 39389k -> 39390k
GGC runs: 628 -> 627
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 116640k
Peak memory use before GGC: 98446k
Peak memory use after GGC: 96093k
Maximum of released memory in single GGC run: 18613k
Garbage: 541232k -> 541253k
Leak: 49722k -> 49722k
Overhead: 40268k -> 40269k
GGC runs: 639
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 134136k
Peak memory use before GGC: 81628k
Peak memory use after GGC: 58507k
Maximum of released memory in single GGC run: 45492k
Garbage: 143523k
Leak: 7142k
Overhead: 25103k
GGC runs: 87
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting increased from 201177k to 203917k, overall 1.36%
Peak amount of GGC memory still allocated after garbage collectin increased from 196173k to 199695k, overall 1.80%
Overall memory needed: 424712k -> 432372k
Peak memory use before GGC: 201177k -> 203917k
Peak memory use after GGC: 196173k -> 199695k
Maximum of released memory in single GGC run: 95153k -> 100795k
Garbage: 272369k -> 272002k
Leak: 47195k
Overhead: 30026k -> 30026k
GGC runs: 105 -> 106
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 347364k to 354884k, overall 2.16%
Peak amount of GGC memory allocated before garbage collecting increased from 208293k to 213376k, overall 2.44%
Peak amount of GGC memory still allocated after garbage collectin increased from 196536k to 200446k, overall 1.99%
Overall memory needed: 347364k -> 354884k
Peak memory use before GGC: 208293k -> 213376k
Peak memory use after GGC: 196536k -> 200446k
Maximum of released memory in single GGC run: 96535k -> 107072k
Garbage: 388086k -> 387716k
Leak: 47779k
Overhead: 47627k -> 47627k
GGC runs: 111 -> 113
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 536244k -> 536336k
Peak memory use before GGC: 314603k
Peak memory use after GGC: 292947k
Maximum of released memory in single GGC run: 163427k
Garbage: 487439k
Leak: 65111k
Overhead: 58883k
GGC runs: 100
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-09-06 06:11:34.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-09-06 17:38:09.000000000 +0000
@@ -1,3 +1,37 @@
+2006-09-06 Nick Clifton <nickc@redhat.com>
+
+ * config/frv/frv.h (EXTRA_MEMORY_CONSTRAINT): Define.
+
+2006-09-05 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/28937
+ * tree-flow.h (tree_ssa_unswitch_loops): Return unsigned int.
+ (canonicalize_induction_variables): Likewise.
+ (tree_unroll_loops_completely): Likewise.
+ (tree_ssa_prefetch_arrays): Likewise.
+ (remove_empty_loops): Likewise.
+ * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Return
+ TODO_cleanup_cfg instead of directly calling
+ cleanup_tree_cfg_loop.
+ * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
+ Likewise.
+ (tree_unroll_loops_completely): Likewise.
+ (remove_empty_loops): Likewise.
+ * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise.
+ * tree-ssa-loop.c (tree_ssa_loop_unswitch): Use the return value
+ of tree_ssa_unswitch_loops.
+ (tree_ssa_loop_ivcanon): Use the return value of
+ canonicalize_induction_variables.
+ (tree_ssa_empty_loop): Use the return value of
+ remove_empty_loops.
+ (tree_complete_unroll): Use the return value of
+ tree_unroll_loops_completely.
+ (tree_ssa_loop_prefetch): Use the return value of
+ tree_ssa_prefetch_arrays.
+ * passes.c (execute_todo): Before Cleanup CFG, set
+ updating_used_alone and after cleanup CFG, call
+ recalculate_used_alone.
+
2006-09-05 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/28952
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2006-09-06 06:11:34.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2006-09-06 17:38:09.000000000 +0000
@@ -1,3 +1,12 @@
+2006-09-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/26696
+ * cvt.c (convert_to_void): Replace a subexpression with no side
+ effects with void_zero_node.
+ * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
+ (get_first_fn): Ditto.
+ * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
+
2006-09-05 Jason Merrill <jason@redhat.com>
PR c++/26571
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.