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: Thu, 19 May 2005 20:44:42 +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:
Amount of memory still referenced at the end of compilation increased from 6711k to 6726k, overall 0.22%
Overall memory needed: 24816k -> 24812k
Peak memory use before GGC: 9651k
Peak memory use after GGC: 8963k -> 8964k
Maximum of released memory in single GGC run: 2791k
Garbage: 42422k -> 42454k
Leak: 6711k -> 6726k
Overhead: 5914k -> 5935k
GGC runs: 330
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage increased from 63452k to 63520k, overall 0.11%
Overall memory needed: 27644k -> 27636k
Peak memory use before GGC: 9177k -> 9178k
Peak memory use after GGC: 8747k -> 8748k
Maximum of released memory in single GGC run: 2204k
Garbage: 63452k -> 63520k
Leak: 7092k -> 7091k
Overhead: 7690k -> 7711k
GGC runs: 525
comparing combine.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 18366k to 18412k, overall 0.25%
Peak amount of GGC memory still allocated after garbage collectin increased from 18179k to 18224k, overall 0.25%
Overall memory needed: 24852k -> 24936k
Peak memory use before GGC: 18366k -> 18412k
Peak memory use after GGC: 18179k -> 18224k
Maximum of released memory in single GGC run: 2522k
Garbage: 88771k -> 88852k
Leak: 7042k -> 7040k
Overhead: 11024k -> 11049k
GGC runs: 484
comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 18563k to 18623k, overall 0.32%
Peak amount of GGC memory still allocated after garbage collectin increased from 18179k to 18224k, overall 0.25%
Overall memory needed: 25640k -> 25704k
Peak memory use before GGC: 18563k -> 18623k
Peak memory use after GGC: 18179k -> 18224k
Maximum of released memory in single GGC run: 3389k -> 3404k
Garbage: 123557k -> 123668k
Leak: 7152k -> 7135k
Overhead: 15239k -> 15277k
GGC runs: 545 -> 544
comparing insn-attrtab.c compilation at -O0 level:
Amount of produced GGC garbage increased from 154203k to 154701k, overall 0.32%
Overall memory needed: 85596k
Peak memory use before GGC: 73852k -> 73853k
Peak memory use after GGC: 45356k -> 45357k
Maximum of released memory in single GGC run: 37612k
Garbage: 154203k -> 154701k
Leak: 11538k -> 11538k
Overhead: 19905k -> 20071k
GGC runs: 268
comparing insn-attrtab.c compilation at -O1 level:
Amount of produced GGC garbage increased from 306690k to 307192k, overall 0.16%
Overall memory needed: 101264k -> 101424k
Peak memory use before GGC: 77258k -> 77259k
Peak memory use after GGC: 66356k -> 66358k
Maximum of released memory in single GGC run: 37101k -> 37102k
Garbage: 306690k -> 307192k
Leak: 11599k -> 11600k
Overhead: 37513k -> 37679k
GGC runs: 385
comparing insn-attrtab.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 120391k to 120533k, overall 0.12%
Peak amount of GGC memory still allocated after garbage collectin increased from 94016k to 94158k, overall 0.15%
Amount of produced GGC garbage increased from 410312k to 410818k, overall 0.12%
Overall memory needed: 155080k -> 153688k
Peak memory use before GGC: 120391k -> 120533k
Peak memory use after GGC: 94016k -> 94158k
Maximum of released memory in single GGC run: 32813k -> 32951k
Garbage: 410312k -> 410818k
Leak: 11438k -> 11438k
Overhead: 50912k -> 51078k
GGC runs: 307
comparing insn-attrtab.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 120393k to 120535k, overall 0.12%
Peak amount of GGC memory still allocated after garbage collectin increased from 94018k to 94160k, overall 0.15%
Amount of produced GGC garbage increased from 411105k to 411609k, overall 0.12%
Overall memory needed: 155092k -> 153648k
Peak memory use before GGC: 120393k -> 120535k
Peak memory use after GGC: 94018k -> 94160k
Maximum of released memory in single GGC run: 32813k -> 32951k
Garbage: 411105k -> 411609k
Leak: 11457k -> 11456k
Overhead: 51036k -> 51202k
GGC runs: 312
comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak amount of GGC memory allocated before garbage collecting increased from 102907k to 103134k, overall 0.22%
Peak amount of GGC memory still allocated after garbage collectin increased from 101886k to 102097k, overall 0.21%
Amount of produced GGC garbage increased from 247847k to 248307k, overall 0.19%
Overall memory needed: 126912k -> 127372k
Peak memory use before GGC: 102907k -> 103134k
Peak memory use after GGC: 101886k -> 102097k
Maximum of released memory in single GGC run: 21112k -> 20902k
Garbage: 247847k -> 248307k
Leak: 53828k -> 53806k
Overhead: 43099k -> 43210k
GGC runs: 347
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory allocated via mmap and sbrk increased from 120296k to 122780k, overall 2.06%
Peak amount of GGC memory allocated before garbage collecting increased from 111955k to 113480k, overall 1.36%
Peak amount of GGC memory still allocated after garbage collectin increased from 100814k to 100997k, overall 0.18%
Amount of produced GGC garbage increased from 678695k to 682542k, overall 0.57%
Overall memory needed: 120296k -> 122780k
Peak memory use before GGC: 111955k -> 113480k
Peak memory use after GGC: 100814k -> 100997k
Maximum of released memory in single GGC run: 20025k -> 20054k
Garbage: 678695k -> 682542k
Leak: 57767k -> 57764k
Overhead: 86872k -> 87919k
GGC runs: 521 -> 519
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 120304k to 122780k, overall 2.06%
Peak amount of GGC memory allocated before garbage collecting increased from 111955k to 113480k, overall 1.36%
Peak amount of GGC memory still allocated after garbage collectin increased from 100814k to 100997k, overall 0.18%
Amount of produced GGC garbage increased from 791193k to 795041k, overall 0.49%
Overall memory needed: 120304k -> 122780k
Peak memory use before GGC: 111955k -> 113480k
Peak memory use after GGC: 100814k -> 100997k
Maximum of released memory in single GGC run: 20025k -> 20054k
Garbage: 791193k -> 795041k
Leak: 58792k -> 58790k
Overhead: 106895k -> 107945k
GGC runs: 619 -> 617
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 113953k to 115563k, overall 1.41%
Amount of produced GGC garbage increased from 813836k to 817758k, overall 0.48%
Overall memory needed: 123184k -> 124496k
Peak memory use before GGC: 113953k -> 115563k
Peak memory use after GGC: 102646k -> 102656k
Maximum of released memory in single GGC run: 21329k -> 21391k
Garbage: 813836k -> 817758k
Leak: 59486k -> 59468k
Overhead: 110022k -> 111107k
GGC runs: 624 -> 617
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-05-19 06:52:30.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-05-19 19:39:42.000000000 +0000
@@ -1,3 +1,61 @@
+2005-05-19 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * tree-ssa-loop-ivopts.c (determine_base_object): Use
+ build_fold_addr_expr to generate trees of correct type.
+ Use fold_buildN if possible.
+
+2005-05-19 Jan Hubicka <jh@suse.cz>
+
+ * basic-block.h (REG_BR_PROB_BASE): Define.
+ * cgraph.c (cgraph_create_edge): Initialize loop_nest and count.
+ (dump_cgraph_node): Dump count.
+ (cgraph_clone_edge): Rescale counts.
+ (cgraph_clone_node): Likewise.
+ * cgraph.h: Include basic-block.h
+ (cgraph_node): Add count.
+ (cgraph_edge): Add count and loop_nest.
+ (cgraph_node, cgraph_edge, cgraph_clone_edge, cgraph_clone_node):
+ Update prototypes.
+ * cgraphunit.c: Kill now redundant inlining comment.
+ (cgraph_create_edges): Make static, maintain current basic block;
+ fix pasto.
+ (record_call_1): Fill in new fields.
+ * ipa-inline.c (cgraph_clone_inlined_nodes): Update call of
+ cgraph_clone_node.
+ (cgraph_decide_recursive_inlining): Likewise.
+ * rtl.h (REG_BR_PROB_BASE): Kill.
+ * tree-inline.c (copy_body_r): Update call of cgraph_clone_edge.
+ (expand_call_inline): Update call of cgraph_create_edge.
+ * tree-optimize.c (tree_rest_of_compilation): Likewise.
+
+2005-05-19 Nick Clifton <nickc@redhat.com>
+
+ * config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use the
+ new rs6000_explicit_options structure.
+
+2005-05-19 Richard Henderson <rth@redhat.com>
+
+ PR target/21390
+ * config/alpha/alpha.c (alpha_emit_conditional_branch): Move
+ TFmode code swapping ...
+ (alpha_emit_xfloating_compare): ... here.
+ (alpha_emit_setcc): Update to match.
+ (alpha_lookup_xfloating_lib_func): Assert TARGET_HAS_XFLOATING_LIBS.
+
+2005-05-19 Richard Henderson <rth@redhat.com>
+
+ PR target/21657
+ * config/ia64/ia64.c (ia64_expand_tls_address): Remove extra
+ memory indirection in local-dynamic case.
+
+2005-05-18 Jie Zhang <jie.zhang@analog.com>
+ Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (branch_dest): Add comment why it's
+ necessary.
+ * config/bfin/bfin.md (attr "length" default): Change the offset of
+ forward conditional branch of length 4 from 4096 to 4092.
+
2005-05-19 Jan Beulich <jbeulich@novell.com>
* unwind-compat.c: Include tconfig.h and tsystem.h.
@@ -44,12 +102,12 @@
2005-05-18 Richard Henderson <rth@redhat.com>
- * tree-ssa-forwprop.c (cfg_changed): New.
- (tidy_after_forward_propagate_addr): New.
- (forward_propagate_addr_expr): Use it, and fold_stmt_inplace.
- (forward_propagate_addr_into_variable_array_index): Likewise.
- (tree_ssa_forward_propagate_single_use_vars): Cleanup cfg if
- edges were removed.
+ * tree-ssa-forwprop.c (cfg_changed): New.
+ (tidy_after_forward_propagate_addr): New.
+ (forward_propagate_addr_expr): Use it, and fold_stmt_inplace.
+ (forward_propagate_addr_into_variable_array_index): Likewise.
+ (tree_ssa_forward_propagate_single_use_vars): Cleanup cfg if
+ edges were removed.
2005-05-18 Geoffrey Keating <geoffk@apple.com>
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-05-19 06:52:33.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-05-19 19:39:46.000000000 +0000
@@ -1,3 +1,9 @@
+2005-05-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/21495
+ * decl.c (grokdeclarator): Fix "storage class specified for"
+ error reporting.
+
2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
* parser.c: Fix comment typos.
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.