This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
Some aspect of GCC memory consumption increased by recent patch
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Thu, 10 Feb 2005 05:12:50 +0000
- Subject: Some aspect of GCC memory consumption increased by recent patch
Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:
comparing combine.c compilation at -O0 level:
Overall memory needed: 24653k -> 24649k
Peak memory use before GGC: 9354k
Peak memory use after GGC: 8668k
Maximum of released memory in single GGC run: 2864k
Garbage: 41652k -> 41669k
Leak: 6407k -> 6391k
Overhead: 5772k -> 5772k
GGC runs: 328
comparing combine.c compilation at -O1 level:
Overall memory needed: 25541k -> 25509k
Peak memory use before GGC: 9227k -> 9231k
Peak memory use after GGC: 8737k -> 8736k
Maximum of released memory in single GGC run: 2027k -> 2028k
Garbage: 61177k -> 60441k
Leak: 6752k -> 6752k
Overhead: 9977k -> 9920k
GGC runs: 502
comparing combine.c compilation at -O2 level:
Overall memory needed: 29561k -> 29557k
Peak memory use before GGC: 12666k
Peak memory use after GGC: 12540k
Maximum of released memory in single GGC run: 2596k -> 2597k
Garbage: 79389k -> 78642k
Leak: 6589k -> 6589k
Overhead: 14119k -> 14076k
GGC runs: 516 -> 515
comparing combine.c compilation at -O3 level:
Overall memory allocated via mmap and sbrk increased from 20208k to 20232k, overall 0.12%
Overall memory needed: 20208k -> 20232k
Peak memory use before GGC: 12798k -> 12769k
Peak memory use after GGC: 12540k
Maximum of released memory in single GGC run: 3406k -> 3407k
Garbage: 107338k -> 106110k
Leak: 7113k -> 7111k
Overhead: 18947k -> 18852k
GGC runs: 583 -> 581
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 114132k
Peak memory use before GGC: 74742k -> 74743k
Peak memory use after GGC: 45488k -> 45489k
Maximum of released memory in single GGC run: 39340k -> 39341k
Garbage: 152663k -> 152665k
Leak: 10979k -> 10979k
Overhead: 19969k -> 19970k
GGC runs: 274
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 124652k -> 124664k
Peak memory use before GGC: 78751k
Peak memory use after GGC: 70098k
Maximum of released memory in single GGC run: 40779k -> 40780k
Garbage: 366121k -> 366124k
Leak: 11356k -> 11356k
Overhead: 69302k -> 69302k
GGC runs: 396
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 149036k -> 147420k
Peak memory use before GGC: 98356k -> 98352k
Peak memory use after GGC: 83472k -> 83469k
Maximum of released memory in single GGC run: 39385k -> 39384k
Garbage: 480593k -> 480572k
Leak: 11245k -> 11237k
Overhead: 84552k -> 84549k
GGC runs: 341 -> 340
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 149052k -> 147412k
Peak memory use before GGC: 98358k -> 98354k
Peak memory use after GGC: 83474k -> 83470k
Maximum of released memory in single GGC run: 39384k
Garbage: 481638k -> 481454k
Leak: 11284k -> 11278k
Overhead: 84702k -> 84701k
GGC runs: 347 -> 346
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 111048k
Peak memory use before GGC: 87151k
Peak memory use after GGC: 85890k
Maximum of released memory in single GGC run: 19511k
Garbage: 246107k -> 246099k
Leak: 55517k -> 55517k
Overhead: 43323k -> 43324k
GGC runs: 366
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 103901k -> 103889k
Peak memory use before GGC: 86009k
Peak memory use after GGC: 85108k
Maximum of released memory in single GGC run: 18951k
Garbage: 445031k -> 433691k
Leak: 56779k -> 56774k
Overhead: 65386k -> 64560k
GGC runs: 523 -> 511
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 93860k to 104893k, overall 11.75%
Overall memory needed: 93860k -> 104893k
Peak memory use before GGC: 86009k
Peak memory use after GGC: 85109k
Maximum of released memory in single GGC run: 18950k
Garbage: 487975k -> 476285k
Leak: 57374k -> 57372k
Overhead: 75140k -> 74299k
GGC runs: 586 -> 574
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage decreased from 498091k to 480878k, overall -3.58%
Overall memory needed: 105985k -> 105981k
Peak memory use before GGC: 87146k -> 87145k
Peak memory use after GGC: 86188k
Maximum of released memory in single GGC run: 19400k -> 19399k
Garbage: 498091k -> 480878k
Leak: 57565k -> 57556k
Overhead: 76117k -> 74886k
GGC runs: 563 -> 557
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-02-09 23:45:41.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-02-10 04:13:29.000000000 +0000
@@ -1,3 +1,53 @@
+2005-02-09 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR tree-optimization/18687
+ * tree-flow.h (find_loop_niter): Declare.
+ * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
+ Try using scev even for loops with more than one exit.
+ * tree-ssa-loop-ivopts.c (struct loop_data): Removed niter field.
+ (struct ivopts_data): Added niters field.
+ (struct nfe_cache_elt): New.
+ (nfe_hash, nfe_eq, niter_for_exit, niter_for_single_dom_exit): New
+ functions.
+ (tree_ssa_iv_optimize_init): Initialize niters cache.
+ (determine_number_of_iterations): Removed.
+ (find_induction_variables): Do not call determine_number_of_iterations.
+ Access niters for single exit through niter_for_single_dom_exit.
+ (add_iv_outer_candidates): Access niters for single exit through
+ niter_for_single_dom_exit.
+ (may_eliminate_iv): Take data argument. Use niter_for_exit. Do not use
+ number_of_iterations_cond.
+ (iv_period): New function.
+ (determine_use_iv_cost_condition): Pass data to may_eliminate_iv.
+ (may_replace_final_value): Take data argument. Use
+ niter_for_single_dom_exit.
+ (determine_use_iv_cost_outer): Pass data to may_replace_final_value.
+ (rewrite_use_compare): Pass data to may_eliminate_iv.
+ (rewrite_use_outer): Pass data to may_replace_final_value.
+ (free_loop_data): Clean up the niters cache.
+ (tree_ssa_iv_optimize_finalize): Free the niters cache.
+ (tree_ssa_iv_optimize_loop): Do not call loop_commit_inserts.
+ * tree-ssa-loop-niter.c (find_loop_niter): New function.
+ (find_loop_niter_by_eval): Use tree_int_cst_lt.
+ (num_ending_zeros): Moved to tree.c.
+ * tree.h (num_ending_zeros): Declare.
+ * tree.c (num_ending_zeros): Moved from tree.c.
+
+2005-02-09 Richard Henderson <rth@redhat.com>
+
+ * builtins.c (DEF_BUILTIN): Add COND argument.
+ * tree.h (DEF_BUILTIN): Likewise.
+ * builtins.def (DEF_GCC_BUILTIN, DEF_LIB_BUILTIN, DEF_EXT_LIB_BUILTIN,
+ DEF_C94_BUILTIN, DEF_C99_BUILTIN, DEF_C99_C90RES_BUILTIN): Update to
+ match.
+ (DEF_BUILTIN_STUB): New.
+ (BUILT_IN_STACK_SAVE, BUILT_IN_STACK_RESTORE, BUILT_IN_INIT_TRAMPOLINE,
+ BUILT_IN_ADJUST_TRAMPOLINE, BUILT_IN_NONLOCAL_GOTO,
+ BUILT_IN_PROFILE_FUNC_ENTER, BUILT_IN_PROFILE_FUNC_EXIT): Use it.
+ * c-common.c (DEF_BUILTIN): Add COND argument.
+ * tree.c (local_define_builtin): New.
+ (build_common_builtin_nodes): New.
+
2005-02-09 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold_strip_sign_ops): New function to simplify a
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-02-09 04:18:21.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-02-10 04:13:34.000000000 +0000
@@ -1,3 +1,23 @@
+2005-02-09 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/19787
+ * call.c (initialize_reference): Robustify.
+
+ PR ++/19732
+ * decl.c (grokdeclarator): Check for invalid use of destructor
+ names.
+
+ PR c++/19762
+ * parser.c (cp_parser_unqualified_id): Avoid creating destructor
+ names with invalid types.
+
+ PR c++/19826
+ * parser.c (cp_parser_direct_declarator): Allow type-dependent
+ expressions as array bounds.
+
+ PR c++/19739
+ * parser.c (cp_parser_attributes_list): Allow empty lists.
+
2005-02-08 Mark Mitchell <mark@codesourcery.com>
PR c++/19733
I am friendly script caring about memory consumption in GCC. Please contact
jh@suse.cz if something is going wrong.
The results can be reproduced by building 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.
Yours testing script.