GCC memory consumption increased by recent patch!

gcctest@suse.de gcctest@suse.de
Sat Jan 8 23:59: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: 24393k -> 24397k
    Peak memory use before GGC: 9063k
    Peak memory use after GGC: 8377k
    Maximum of released memory in single GGC run: 2864k
    Garbage: 41736k
    Leak: 5862k
    Overhead: 5544k
    GGC runs: 352

comparing combine.c compilation at -O1 level:
    Overall memory needed: 25365k
    Peak memory use before GGC: 8951k
    Peak memory use after GGC: 8450k
    Maximum of released memory in single GGC run: 2024k -> 2023k
    Garbage: 66726k -> 66632k
    Leak: 6257k
    Overhead: 10310k -> 10292k
    GGC runs: 545 -> 544

comparing combine.c compilation at -O2 level:
    Overall memory needed: 28853k -> 28857k
    Peak memory use before GGC: 12383k
    Peak memory use after GGC: 12257k
    Maximum of released memory in single GGC run: 2533k
    Garbage: 80658k -> 80597k
    Leak: 6081k
    Overhead: 14119k -> 14111k
    GGC runs: 546

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 6586k to 6602k, overall 0.24%
    Overall memory needed: 31253k -> 31249k
    Peak memory use before GGC: 12635k
    Peak memory use after GGC: 12257k
    Maximum of released memory in single GGC run: 3347k
    Garbage: 109160k -> 109084k
    Leak: 6586k -> 6602k
    Overhead: 18985k -> 18976k
    GGC runs: 613

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 117268k
    Peak memory use before GGC: 77779k
    Peak memory use after GGC: 45259k
    Maximum of released memory in single GGC run: 42606k
    Garbage: 159302k
    Leak: 10432k
    Overhead: 20571k
    GGC runs: 294

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 128492k -> 128524k
    Peak memory use before GGC: 83296k
    Peak memory use after GGC: 69015k
    Maximum of released memory in single GGC run: 40616k
    Garbage: 441432k -> 441380k
    Leak: 10778k
    Overhead: 77163k -> 77157k
    GGC runs: 431 -> 429

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 153120k -> 153256k
    Peak memory use before GGC: 99056k
    Peak memory use after GGC: 84176k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 487966k -> 487928k
    Leak: 10702k
    Overhead: 85263k -> 85258k
    GGC runs: 363

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 153268k -> 153120k
    Peak memory use before GGC: 99057k
    Peak memory use after GGC: 84178k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 489168k -> 489130k
    Leak: 10744k
    Overhead: 85423k -> 85417k
    GGC runs: 373

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 110800k
    Peak memory use before GGC: 86610k
    Peak memory use after GGC: 85642k
    Maximum of released memory in single GGC run: 19292k
    Garbage: 246356k
    Leak: 54976k
    Overhead: 43121k
    GGC runs: 368

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 103709k
    Peak memory use before GGC: 85639k
    Peak memory use after GGC: 84690k
    Maximum of released memory in single GGC run: 18904k
    Garbage: 466280k -> 466107k
    Leak: 56722k
    Overhead: 66940k -> 66911k
    GGC runs: 554

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 103765k
    Peak memory use before GGC: 85639k
    Peak memory use after GGC: 84691k
    Maximum of released memory in single GGC run: 18904k
    Garbage: 500620k -> 500471k
    Leak: 57302k
    Overhead: 76402k -> 76378k
    GGC runs: 597

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 111453k
    Peak memory use before GGC: 92444k
    Peak memory use after GGC: 85893k
    Maximum of released memory in single GGC run: 19736k
    Garbage: 520600k -> 520419k
    Leak: 57619k -> 57627k
    Overhead: 78242k -> 78218k
    GGC runs: 580

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-01-08 12:56:15.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-01-08 22:58:26.000000000 +0000
@@ -1,3 +1,23 @@
+2005-01-08  Jeff Law  <law@redhat.com>
+	    Diego Novillo  <dnovillo@redhat.com>
+
+	PR tree-optimization/18241
+	* tree-nrv.c (tree_nrv): Ignore volatile return values.
+	* tree-ssa-dse.c (dse_optimize_stmt): Do not optimize
+	statements with volatile operands.
+	* tree-ssa-operands.c (add_stmt_operand): Do add volatile
+	operands after marking a statement with has_volatile_ops.
+
+2005-01-08  Roger Sayle  <roger@eyesopen.com>
+
+	* tree.c (int_fits_type_p): Always honor integer constant
+	TYPE_MIN_VALUE and TYPE_MAX_VALUE if they exist.
+
+2005-01-08  Roger Sayle  <roger@eyesopen.com>
+
+	* ifcvt.c (find_if_case_1): Reinstate 2005-01-04 change, now that
+	the latent bug in rtl_delete_block has been resolved.
+
 2005-01-08  Richard Sandiford  <rsandifo@redhat.com>
 
 	* config/mips/t-iris6 (MULTILIB_DIRNAMES): Use -mabi argument values.

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