This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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: 24917k
    Peak memory use before GGC: 9599k
    Peak memory use after GGC: 8946k
    Maximum of released memory in single GGC run: 2736k
    Garbage: 40098k
    Leak: 6709k
    Overhead: 5789k
    GGC runs: 317

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26824k
    Peak memory use before GGC: 17367k
    Peak memory use after GGC: 17184k
    Maximum of released memory in single GGC run: 2373k
    Garbage: 60836k -> 60841k
    Leak: 6890k
    Overhead: 7637k -> 7637k
    GGC runs: 388

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26824k
    Peak memory use before GGC: 17370k
    Peak memory use after GGC: 17184k
    Maximum of released memory in single GGC run: 2453k
    Garbage: 77578k -> 77597k
    Leak: 6977k
    Overhead: 10054k -> 10058k
    GGC runs: 457

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 108076k to 108308k, overall 0.22%
  Amount of memory still referenced at the end of compilation increased from 7034k to 7056k, overall 0.31%
    Overall memory needed: 26824k
    Peak memory use before GGC: 18370k
    Peak memory use after GGC: 18000k
    Maximum of released memory in single GGC run: 3513k -> 3526k
    Garbage: 108076k -> 108308k
    Leak: 7034k -> 7056k
    Overhead: 13588k -> 13613k
    GGC runs: 508 -> 509

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 80928k
    Peak memory use before GGC: 69473k
    Peak memory use after GGC: 45011k
    Maximum of released memory in single GGC run: 36247k
    Garbage: 146440k
    Leak: 10101k
    Overhead: 19797k
    GGC runs: 251

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 112108k
    Peak memory use before GGC: 94461k
    Peak memory use after GGC: 83560k
    Maximum of released memory in single GGC run: 32588k
    Garbage: 296187k
    Leak: 10079k
    Overhead: 36751k
    GGC runs: 247

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 125656k
    Peak memory use before GGC: 111820k
    Peak memory use after GGC: 83479k
    Maximum of released memory in single GGC run: 32177k
    Garbage: 381027k
    Leak: 10180k
    Overhead: 48262k
    GGC runs: 274

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 125700k
    Peak memory use before GGC: 111839k
    Peak memory use after GGC: 83498k
    Maximum of released memory in single GGC run: 32502k
    Garbage: 381639k
    Leak: 10185k
    Overhead: 48414k
    GGC runs: 277

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118392k
    Peak memory use before GGC: 95142k
    Peak memory use after GGC: 94194k
    Maximum of released memory in single GGC run: 20460k
    Garbage: 223578k
    Leak: 49201k
    Overhead: 36724k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
  Amount of produced GGC garbage increased from 566916k to 568572k, overall 0.29%
    Overall memory needed: 105536k -> 105544k
    Peak memory use before GGC: 95271k
    Peak memory use after GGC: 93196k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 566916k -> 568572k
    Leak: 55031k -> 55039k
    Overhead: 67492k -> 67305k
    GGC runs: 519 -> 520

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106164k -> 106124k
    Peak memory use before GGC: 95271k
    Peak memory use after GGC: 93197k
    Maximum of released memory in single GGC run: 20342k
    Garbage: 652030k -> 651462k
    Leak: 55804k -> 55804k
    Overhead: 78902k -> 78303k
    GGC runs: 586

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Amount of produced GGC garbage increased from 709540k to 710428k, overall 0.13%
    Overall memory needed: 109316k -> 109244k
    Peak memory use before GGC: 96739k
    Peak memory use after GGC: 94274k
    Maximum of released memory in single GGC run: 20839k
    Garbage: 709540k -> 710428k
    Leak: 57049k -> 57067k
    Overhead: 83763k -> 83213k
    GGC runs: 594 -> 596

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-11-30 11:39:29.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-11-30 21:57:30.000000000 +0000
@@ -1,3 +1,58 @@
+2005-11-30  Richard Guenther  <rguenther@suse.de>
+
+	PR tree-optimization/22501
+	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): New
+	function split out from ...
+	(forward_propagate_addr_expr): ... here.  Use it to propagate
+	ADDR_EXPRs to all uses.
+
+2005-11-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+	* tree.h (CASE_FLT_FN, CASE_INT_FN): New macros.
+	* builtins.c (expand_builtin_mathfn): Use them.
+	(expand_builtin_mathfn_2): Likewise.
+	(expand_builtin_mathfn_3): Likewise.
+	(expand_builtin_int_roundingfn): Likewise.
+	(expand_builtin): Likewise.
+	(integer_valued_real_p): Likewise.
+	(fold_builtin_int_roundingfn): Likewise.
+	(fold_builtin_bitop): Likewise.
+	(fold_builtin_logarithm): Likewise.
+	(fold_builtin_1): Likewise.
+	* convert.c (convert_to_integer): Likewise.
+	* fold-const.c (negate_mathfn_p): Likewise.
+	(tree_expr_nonnegative_p): Likewise.
+
+2005-11-30  Dale Johannesen  <dalej@apple.com>
+            Andrew Pinski  <pinskia@physics.uc.edu>
+
+	* combine.c (find_split_point):  Sign extend bitmask
+	when changing bitfield assignment to IOR of AND.
+
+2005-11-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* config/ms1/ms1.md (decrement_and_branch_until_zero): Add early
+	clobber to scratch reg.
+	(*decrement_and_branch_until_zero_no_clobber): Remove.
+	(decrement_and_branch peephole): Add dummy scratch reg to pattern.
+	(mulhish3): Use TARGET_MS1_16_003, TARGET_MS2.
+	* config/ms1/ms1.opt (mmul): Remove.
+	* config/ms1/ms1.h (ASM_SPEC): Cope with uppercase arch names.
+	(LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Default to 16-002.
+
+2005-11-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+	    Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* pa/predicates.md (symbolic_operand): Add comment.
+	* pa/pa.md (reload_insi_r1, reload_indi_r1): New reload expanders.
+	* pa/pa-protos.h (pa_secondary_reload_class): Delete.
+	* pa/pa.c (TARGET_SECONDARY_RELOAD): Define.
+	(pa_secondary_reload_class): Delete.
+	(pa_secondary_reload): New function derived from SECONDARY_RELOAD_CLASS
+	and pa_secondary_reload_class.  Reorder some checks.  Update inline
+	copy of symbolic operand.
+	* pa/pa.h (SECONDARY_RELOAD_CLASS): Delete.
+
 2005-11-30  Nathan Sidwell  <nathan@codesourcery.com>
 
 	* loop-doloop.c (add_test): Only add jump notes if we did emit a
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2005-11-29 15:04:41.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2005-11-30 21:57:29.000000000 +0000
@@ -1,3 +1,9 @@
+2005-11-30  Jason Merrill  <jason@redhat.com>
+
+	PR c++/21123
+	* cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference 
+	parms in a thunk.
+
 2005-11-30  Ben Elliston  <bje@au.ibm.com>
 
 	* typeck.c (build_x_unary_op): Correct spelling in error message.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]