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: Fri, 28 Apr 2006 08:10:52 +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: 25056k -> 25068k
Peak memory use before GGC: 9509k
Peak memory use after GGC: 8897k
Maximum of released memory in single GGC run: 2602k
Garbage: 38655k
Leak: 6733k
Overhead: 5889k
GGC runs: 304
comparing combine.c compilation at -O1 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17430k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2287k
Garbage: 59207k -> 59221k
Leak: 6878k -> 6870k
Overhead: 7038k -> 7038k
GGC runs: 374 -> 379
comparing combine.c compilation at -O2 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17435k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2387k
Garbage: 83229k -> 83248k
Leak: 6996k
Overhead: 9691k -> 9695k
GGC runs: 442 -> 446
comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 18537k to 18595k, overall 0.31%
Peak amount of GGC memory still allocated after garbage collectin increased from 17840k to 17898k, overall 0.33%
Overall memory needed: 25992k
Peak memory use before GGC: 18537k -> 18595k
Peak memory use after GGC: 17840k -> 17898k
Maximum of released memory in single GGC run: 3516k
Garbage: 113356k -> 113377k
Leak: 7086k
Overhead: 13187k -> 13188k
GGC runs: 494
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 82164k
Peak memory use before GGC: 69036k
Peak memory use after GGC: 44790k
Maximum of released memory in single GGC run: 36009k
Garbage: 140381k
Leak: 9901k
Overhead: 20394k
GGC runs: 239
comparing insn-attrtab.c compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting increased from 85347k to 85627k, overall 0.33%
Peak amount of GGC memory still allocated after garbage collectin increased from 79195k to 79523k, overall 0.41%
Overall memory needed: 105340k -> 105676k
Peak memory use before GGC: 85347k -> 85627k
Peak memory use after GGC: 79195k -> 79523k
Maximum of released memory in single GGC run: 32286k
Garbage: 283065k -> 283066k
Leak: 10065k
Overhead: 33382k -> 33382k
GGC runs: 239
comparing insn-attrtab.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 89760k to 90038k, overall 0.31%
Peak amount of GGC memory still allocated after garbage collectin increased from 81649k to 81927k, overall 0.34%
Overall memory needed: 107868k -> 109720k
Peak memory use before GGC: 89760k -> 90038k
Peak memory use after GGC: 81649k -> 81927k
Maximum of released memory in single GGC run: 30736k
Garbage: 330591k -> 330594k
Leak: 10051k
Overhead: 40625k -> 40625k
GGC runs: 264 -> 265
comparing insn-attrtab.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 89788k to 90064k, overall 0.31%
Peak amount of GGC memory still allocated after garbage collectin increased from 81677k to 81953k, overall 0.34%
Overall memory needed: 107976k -> 109848k
Peak memory use before GGC: 89788k -> 90064k
Peak memory use after GGC: 81677k -> 81953k
Maximum of released memory in single GGC run: 30935k
Garbage: 331220k -> 331207k
Leak: 10056k
Overhead: 40825k -> 40822k
GGC runs: 268
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118248k
Peak memory use before GGC: 95020k
Peak memory use after GGC: 94073k
Maximum of released memory in single GGC run: 20358k
Garbage: 218001k
Leak: 49503k
Overhead: 37967k
GGC runs: 362
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 115836k -> 115832k
Peak memory use before GGC: 97667k
Peak memory use after GGC: 96688k
Maximum of released memory in single GGC run: 18987k
Garbage: 463201k -> 463201k
Leak: 52789k
Overhead: 51423k -> 51422k
GGC runs: 507 -> 508
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 115852k -> 115860k
Peak memory use before GGC: 97667k
Peak memory use after GGC: 96687k
Maximum of released memory in single GGC run: 18987k
Garbage: 552098k -> 552092k
Leak: 53690k -> 53690k
Overhead: 60166k -> 60166k
GGC runs: 586 -> 587
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 117136k
Peak memory use before GGC: 98962k
Peak memory use after GGC: 97982k
Maximum of released memory in single GGC run: 19239k
Garbage: 571922k -> 571901k
Leak: 54048k
Overhead: 61145k -> 61135k
GGC runs: 597 -> 596
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-04-27 20:09:59.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-04-28 06:56:44.000000000 +0000
@@ -1,3 +1,56 @@
+2006-04-28 Alan Modra <amodra@bigpond.net.au>
+
+ PR middle-end/27260
+ * builtins.c (expand_builtin_memset): Expand val in original mode.
+
+2006-04-27 Eric Christopher <echristo@apple.com>
+
+ * target-def.h (TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Bracket
+ with #ifndef/#endif.
+ * config/darwin-c.c (darwin_ms_struct): New.
+ (darwin_pragma_ms_struct): Ditto.
+ (darwin_set_default_type_attributes): Ditto.
+ * config/darwin-protos.h (darwin_pragma_ms_struct): Declare.
+ * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS):
+ Register ms_struct pragma.
+ * config/i386/darwin.h (REGISTER_TARGET_PRAGMAS): Declare.
+ (TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Ditto.
+ * config/rs6000/rs6000.c (rs6000_set_default_type_attributes): Call
+ darwin_set_default_type_attributes if TARGET_MACHO.
+
+2006-04-27 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/26854
+ * tree-vrp.c (remove_range_assertions): Use new Immuse iterator.
+ * doc/tree-ssa.texi: Update immuse iterator documentation.
+ * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Use new iterator.
+ * tree-ssa-dom.c (propagate_rhs_into_lhs): Use new iterator.
+ * tree-flow-inline.h (end_safe_imm_use_traverse, end_safe_imm_use_p,
+ first_safe_imm_use, next_safe_imm_use): Remove.
+ (end_imm_use_stmt_p): New. Check for end of immuse stmt traversal.
+ (end_imm_use_stmt_traverse): New. Terminate immuse stmt traversal.
+ (move_use_after_head): New. Helper function to sort immuses in a stmt.
+ (link_use_stmts_after): New. Link all immuses in a stmt consescutively.
+ (first_imm_use_stmt): New. Get first stmt in an immuse list.
+ (next_imm_use_stmt): New. Get next stmt in an immuse list.
+ (first_imm_use_on_stmt): New. Get first immuse on a stmt.
+ (end_imm_use_on_stmt_p): New. Check for end of immuses on a stmt.
+ (next_imm_use_on_stmt): New. Move to next immuse on a stmt.
+ * tree-ssa-forwprop.c (forward_propagate_addr_expr): Use new iterator.
+ * lambda-code.c (lambda_loopnest_to_gcc_loopnest): Use new iterator.
+ (perfect_nestify): Use new iterator.
+ * tree-vect-transform.c (vect_create_epilog_for_reduction): Use new
+ iterator.
+ * tree-flow.h (struct immediate_use_iterator_d): Add comments.
+ (next_imm_name): New field in struct immediate_use_iterator_d.
+ (FOR_EACH_IMM_USE_SAFE, BREAK_FROM_SAFE_IMM_USE): Remove.
+ (FOR_EACH_IMM_USE_STMT, BREAK_FROM_IMM_USE_STMT,
+ FOR_EACH_IMM_USE_ON_STMT): New immediate use iterator macros.
+ * tree-cfg.c (replace_uses_by): Use new iterator.
+ * tree-ssa-threadedge.c (lhs_of_dominating_assert): Use new iterator.
+ * tree-ssa-operands.c (correct_use_link): Remove.
+ (finalize_ssa_use_ops): No longer call correct_use_link.
+
2006-04-27 Stuart Hastings <stuart@apple.com>
* config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): New.
@@ -8,7 +61,7 @@
call_nonlocal_sysv, call_value_indirect_nonlocal_sysv,
call_value_nonlocal_sysv): Suffix with the "P" macro for 32/64
support.
-
+
2006-04-27 Roger Sayle <roger@eyesopen.com>
* expmed.c (store_fixed_bit_field): If we're not optimizing for
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2006-04-27 20:09:58.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2006-04-28 06:56:44.000000000 +0000
@@ -1,5 +1,8 @@
2006-04-27 Mark Mitchell <mark@codesourcery.com>
+ PR c++/27292
+ * tree.c (rvalue): Convert bitfields to their declared types.
+
PR c++/27102
* typeck2.c (cxx_incomplete_type_diagnostic): Handle
TYPENAME_TYPE.
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.