GCC memory consumption increased by recent patch!

gcctest@suse.de gcctest@suse.de
Tue Mar 8 23:45:00 GMT 2005


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: 24661k
    Peak memory use before GGC: 9359k
    Peak memory use after GGC: 8673k
    Maximum of released memory in single GGC run: 2865k
    Garbage: 41675k
    Leak: 6395k
    Overhead: 5772k
    GGC runs: 327

comparing combine.c compilation at -O1 level:
    Overall memory needed: 24521k -> 24513k
    Peak memory use before GGC: 8674k
    Peak memory use after GGC: 8094k
    Maximum of released memory in single GGC run: 2025k
    Garbage: 58425k
    Leak: 6756k
    Overhead: 9858k
    GGC runs: 501

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 78317k to 78822k, overall 0.64%
    Overall memory needed: 29141k -> 29137k
    Peak memory use before GGC: 12671k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 2532k -> 2596k
    Garbage: 78317k -> 78822k
    Leak: 6594k -> 6592k
    Overhead: 14181k -> 14261k
    GGC runs: 520 -> 522

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 105965k to 106537k, overall 0.54%
    Overall memory needed: 30809k -> 30797k
    Peak memory use before GGC: 12707k -> 12718k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 3384k -> 3420k
    Garbage: 105965k -> 106537k
    Leak: 7189k -> 7182k
    Overhead: 19040k -> 19120k
    GGC runs: 582 -> 581

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 114212k
    Peak memory use before GGC: 74821k
    Peak memory use after GGC: 45494k
    Maximum of released memory in single GGC run: 39413k
    Garbage: 152830k
    Leak: 10984k
    Overhead: 19970k
    GGC runs: 273

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 124404k -> 124308k
    Peak memory use before GGC: 78641k
    Peak memory use after GGC: 70036k
    Maximum of released memory in single GGC run: 40773k
    Garbage: 369239k
    Leak: 11360k
    Overhead: 71916k
    GGC runs: 400

comparing insn-attrtab.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 487109k to 489756k, overall 0.54%
    Overall memory needed: 147436k -> 147456k
    Peak memory use before GGC: 97674k -> 97678k
    Peak memory use after GGC: 83493k -> 83497k
    Maximum of released memory in single GGC run: 39163k -> 39453k
    Garbage: 487109k -> 489756k
    Leak: 11244k -> 11249k
    Overhead: 87133k -> 87472k
    GGC runs: 343

comparing insn-attrtab.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 487899k to 490563k, overall 0.55%
    Overall memory needed: 148928k -> 147496k
    Peak memory use before GGC: 97680k
    Peak memory use after GGC: 83499k
    Maximum of released memory in single GGC run: 39162k -> 39453k
    Garbage: 487899k -> 490563k
    Leak: 11287k -> 11286k
    Overhead: 87262k -> 87602k
    GGC runs: 349

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111952k
    Peak memory use before GGC: 87325k
    Peak memory use after GGC: 85900k
    Maximum of released memory in single GGC run: 19511k
    Garbage: 246370k
    Leak: 55513k
    Overhead: 43275k
    GGC runs: 366

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 104025k -> 104041k
    Peak memory use before GGC: 86183k
    Peak memory use after GGC: 85119k
    Maximum of released memory in single GGC run: 18950k
    Garbage: 435089k
    Leak: 56863k
    Overhead: 65187k
    GGC runs: 513

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Amount of produced GGC garbage increased from 476540k to 478015k, overall 0.31%
    Overall memory needed: 104249k
    Peak memory use before GGC: 86184k
    Peak memory use after GGC: 85119k
    Maximum of released memory in single GGC run: 18951k
    Garbage: 476540k -> 478015k
    Leak: 57427k -> 57432k
    Overhead: 74952k -> 75195k
    GGC runs: 569 -> 568

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Amount of produced GGC garbage increased from 481661k to 483200k, overall 0.32%
    Overall memory needed: 105349k -> 105353k
    Peak memory use before GGC: 87323k
    Peak memory use after GGC: 86199k
    Maximum of released memory in single GGC run: 19400k
    Garbage: 481661k -> 483200k
    Leak: 57631k -> 57615k
    Overhead: 75643k -> 75891k
    GGC runs: 557 -> 559

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-03-08 13:08:05.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-03-08 22:44:52.000000000 +0000
@@ -1,3 +1,61 @@
+2005-03-08  Fariborz Jahanian <fjahanian@apple.com>
+
+	* config/rs6000/rs6000.c (invalid_arg_for_unprototyped_fn): 
+	Define the real function for ppc-darwin.
+	* c-typeck.c (convert_arguments): Check for target-specific
+	invalid argument call to unprototyped function.
+	* target-def.h (TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN): 
+	New Macro.
+	* target.h (invalid_arg_for_unprototyped_fn): New field 
+	in struct calls.
+	* targhooks.c (hook_invalid_arg_for_unprototyped_fn): New 
+	default target hook.
+	* targhooks.h (hook_invalid_arg_for_unprototyped_fn): 
+	Declare.
+
+2005-03-08  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* c-typeck.c (constructor_stack, constructor_range_stack,
+	initializer_stack): Make them static.
+
+	* cfg.c (rbi_pool): Make it static.
+
+	* gimple-low.c (lower_stmt_body): Make it static.
+	* tree-flow.h: Remove the corresponding prototype.  Don't
+	declare lower_data.
+
+	* sched-deps.c (cache_size): Make it static.
+
+	* stor-layout.c (lang_adjust_rli): Make it static.
+
+2005-03-08  Julian Brown  <julian@codesourcery.com>
+
+	* config/elfos.h (MAKE_DECL_ONE_ONLY): Redefined to stop DECL_WEAK
+	from being used for symbols with vague linkage when
+	HAVE_GAS_COMDAT_GROUP is true.
+
+2005-03-08  J"orn Rennecke <joern.rennecke@st.com>
+
+	* jump.c (invert_jump_1): Don't call redirect_jump_1 with
+	nlabel == JUMP_LABEL (jump).
+
+2005-03-08  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* c-common.c, c-opts.c, combine.c, cse.c, dojump.c,
+	gimplify.c, tree-dfa.c, tree-ssa-loop-ivopts.c,
+	tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-sink.c,
+	tree-vect-analyze.c, tree.def, tree.h: Fix comment formatting.
+
+2005-03-08  Alexey Neyman  <alex.neyman@auriga.ru>
+
+	PR c/14411
+	* calls.c (flags_from_decl_or_type): Handle eturns_twice' attribute.
+	* c-common.c (handle_returns_twice): New function.
+	(c_common_attribute_table): Declare eturns_twice' attribute.
+	* doc/extend.texi: Document eturns_twice' attribute.
+	* tree.h (DECL_IS_RETURNS_TWICE): New macro.
+	(struct tree_decl): Add returns_twice_flag.
+
 2005-03-08  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* tree-ssa-phiopt.c: Fix a comment typo.

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.



More information about the Gcc-regression mailing list