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: Sat, 04 Jun 2005 18:53:02 +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:
Peak amount of GGC memory still allocated after garbage collectin increased from 8969k to 8978k, overall 0.10%
Amount of memory still referenced at the end of compilation increased from 6716k to 6724k, overall 0.12%
Overall memory needed: 25288k -> 25300k
Peak memory use before GGC: 9657k -> 9665k
Peak memory use after GGC: 8969k -> 8978k
Maximum of released memory in single GGC run: 2790k
Garbage: 42279k -> 42282k
Leak: 6716k -> 6724k
Overhead: 5889k -> 5889k
GGC runs: 329 -> 328
comparing combine.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 7098k to 7106k, overall 0.11%
Overall memory needed: 27636k -> 27640k
Peak memory use before GGC: 9165k -> 9173k
Peak memory use after GGC: 8724k -> 8732k
Maximum of released memory in single GGC run: 2204k
Garbage: 63144k -> 63163k
Leak: 7098k -> 7106k
Overhead: 7790k -> 7792k
GGC runs: 520
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 7087k to 7095k, overall 0.11%
Overall memory needed: 24824k -> 24832k
Peak memory use before GGC: 18282k -> 18290k
Peak memory use after GGC: 18100k -> 18109k
Maximum of released memory in single GGC run: 2524k
Garbage: 86244k -> 86245k
Leak: 7087k -> 7095k
Overhead: 10926k -> 10927k
GGC runs: 479
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7174k to 7182k, overall 0.11%
Overall memory needed: 25032k -> 25068k
Peak memory use before GGC: 18284k -> 18292k
Peak memory use after GGC: 18100k -> 18109k
Maximum of released memory in single GGC run: 3099k
Garbage: 114895k -> 114900k
Leak: 7174k -> 7182k
Overhead: 14474k -> 14471k
GGC runs: 527 -> 528
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 85580k -> 85588k
Peak memory use before GGC: 73379k -> 73387k
Peak memory use after GGC: 45364k -> 45373k
Maximum of released memory in single GGC run: 37597k
Garbage: 153195k -> 153190k
Leak: 11542k -> 11550k
Overhead: 19639k -> 19639k
GGC runs: 268
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 101176k -> 101184k
Peak memory use before GGC: 76439k -> 76447k
Peak memory use after GGC: 65594k -> 65602k
Maximum of released memory in single GGC run: 37075k
Garbage: 304678k -> 304678k
Leak: 11603k -> 11611k
Overhead: 38534k -> 38534k
GGC runs: 381
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 154656k -> 154684k
Peak memory use before GGC: 121107k -> 121115k
Peak memory use after GGC: 92199k -> 92207k
Maximum of released memory in single GGC run: 32951k -> 32950k
Garbage: 402864k -> 402864k
Leak: 11439k -> 11447k
Overhead: 51375k -> 51375k
GGC runs: 304 -> 303
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 154652k -> 154632k
Peak memory use before GGC: 121109k -> 121117k
Peak memory use after GGC: 92201k -> 92209k
Maximum of released memory in single GGC run: 32950k
Garbage: 403630k -> 403630k
Leak: 11460k -> 11468k
Overhead: 51496k -> 51496k
GGC runs: 310 -> 309
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 127332k -> 127340k
Peak memory use before GGC: 103083k -> 103091k
Peak memory use after GGC: 102060k -> 102069k
Maximum of released memory in single GGC run: 21524k
Garbage: 247519k -> 247514k
Leak: 53777k -> 53785k
Overhead: 42959k -> 42959k
GGC runs: 347 -> 346
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121440k -> 121448k
Peak memory use before GGC: 112525k -> 112533k
Peak memory use after GGC: 100703k -> 100711k
Maximum of released memory in single GGC run: 20026k
Garbage: 662394k -> 662424k
Leak: 58941k -> 58917k
Overhead: 86366k -> 86365k
GGC runs: 518
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 121428k -> 121436k
Peak memory use before GGC: 112526k -> 112534k
Peak memory use after GGC: 100703k -> 100711k
Maximum of released memory in single GGC run: 20027k
Garbage: 758094k -> 758014k
Leak: 59612k -> 59636k
Overhead: 104509k -> 104501k
GGC runs: 600
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 124368k -> 124376k
Peak memory use before GGC: 115268k -> 115276k
Peak memory use after GGC: 102529k -> 102537k
Maximum of released memory in single GGC run: 21386k
Garbage: 814220k -> 814222k
Leak: 60956k -> 60964k
Overhead: 111035k -> 111035k
GGC runs: 604
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-06-04 14:16:41.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-06-04 17:50:50.000000000 +0000
@@ -1,3 +1,39 @@
+2005-06-04 Daniel Berlin <dberlin@dberlin.org>
+
+ * cfgexpand.c (expand_one_var): Use DECL_HAS_VALUE_EXPR_P.
+ * dwarf2out.c (loc_descriptor_from_tree_1): Ditto.
+ * expr.c (expand_var): Ditto.
+ * function.c (gimplify_parameters): Use SET_DECL_VALUE_EXPR too.
+ * gimplify.c (gimplify_decl_expr): Ditto.
+ (gimplify_expr): Ditto.
+ * tree-mudflap.c (mf_decl_eligible_p): Use DECL_HAS_VALUE_EXPR_P.
+ * tree.c (value_expr_for_decl): New.
+ (print_value_expr_statistics): New.
+ (init_ttree): Init value_expr_for_decl.
+ (decl_value_expr_lookup): New.
+ (decl_value_expr_insert): Ditto.
+ (copy_node_stat): Copy DECL_VALUE_EXPR status.
+ * tree.h (DECL_VALUE_EXPR): Use hashtable.
+ (SET_DECL_VALUE_EXPR): New.
+ (DECL_HAS_VALUE_EXPR_P): New.
+
+2005-06-04 Steven Bosscher <stevenb@suse.de>
+
+ * lcm.c: Move all mode-switching related functions from here...
+ * mode-switching.c: ...to this new file.
+ * doc/passes.texi: Update accordingly.
+
+ * basic-block.h (label_value_list): Remove extern decl.
+ * cfgrtl.c (label_value_list): Remove.
+ (can_delete_label_p): Don't look at it.
+ * cfgcleanup.c (cleanup_cfg): Don't free it.
+
+ * common.opt: Don't refer to non-existing flag_alias_check.
+
+2005-06-04 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/aix52.h (ASM_CPU_SPEC): Add power5.
+
2005-06-04 Kazu Hirata <kazu@codesourcery.com>
* function.c (prologue, epilogue, sibcall_epilogue): Change
@@ -58,7 +94,7 @@
2005-06-03 Eric Christopher <echristo@redhat.com>
* config/mips/mips.opt: Add RejectNegative to divide-breaks and
- divide-traps.
+ divide-traps.
2005-06-03 Jan Hubicka <jh@suse.cz>
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.