GCC memory consumption increased by recent patch!

gcctest@suse.de gcctest@suse.de
Sat Mar 12 17:20: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: 24665k
    Peak memory use before GGC: 9358k
    Peak memory use after GGC: 8672k
    Maximum of released memory in single GGC run: 2864k
    Garbage: 41686k
    Leak: 6394k
    Overhead: 5770k
    GGC runs: 327

comparing combine.c compilation at -O1 level:
    Overall memory needed: 24485k -> 24477k
    Peak memory use before GGC: 8667k
    Peak memory use after GGC: 8093k
    Maximum of released memory in single GGC run: 2021k
    Garbage: 58308k
    Leak: 6753k
    Overhead: 9834k
    GGC runs: 501

comparing combine.c compilation at -O2 level:
    Overall memory needed: 28889k
    Peak memory use before GGC: 12670k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 2596k
    Garbage: 78894k
    Leak: 6589k
    Overhead: 14262k
    GGC runs: 522

comparing combine.c compilation at -O3 level:
    Overall memory needed: 30805k
    Peak memory use before GGC: 12715k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 3423k
    Garbage: 106697k
    Leak: 7195k
    Overhead: 19107k
    GGC runs: 583

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 114212k
    Peak memory use before GGC: 74821k
    Peak memory use after GGC: 45493k
    Maximum of released memory in single GGC run: 39414k
    Garbage: 152812k
    Leak: 10983k
    Overhead: 19968k
    GGC runs: 273

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 124436k -> 124760k
    Peak memory use before GGC: 78641k
    Peak memory use after GGC: 70035k
    Maximum of released memory in single GGC run: 40773k
    Garbage: 369231k
    Leak: 11360k
    Overhead: 71914k
    GGC runs: 400

comparing insn-attrtab.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 137772k to 147448k, overall 7.02%
    Overall memory needed: 137772k -> 147448k
    Peak memory use before GGC: 97673k
    Peak memory use after GGC: 83493k
    Maximum of released memory in single GGC run: 39453k
    Garbage: 489762k
    Leak: 11240k
    Overhead: 87471k
    GGC runs: 343

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 148972k
    Peak memory use before GGC: 97675k
    Peak memory use after GGC: 83495k
    Maximum of released memory in single GGC run: 39453k
    Garbage: 490574k
    Leak: 11277k
    Overhead: 87601k
    GGC runs: 349

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111956k
    Peak memory use before GGC: 87327k
    Peak memory use after GGC: 85902k
    Maximum of released memory in single GGC run: 19511k
    Garbage: 246348k
    Leak: 55514k
    Overhead: 43272k
    GGC runs: 366

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 104029k
    Peak memory use before GGC: 86185k
    Peak memory use after GGC: 85120k
    Maximum of released memory in single GGC run: 18950k
    Garbage: 435007k
    Leak: 56860k
    Overhead: 65155k
    GGC runs: 513

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 104253k
    Peak memory use before GGC: 86185k
    Peak memory use after GGC: 85121k
    Maximum of released memory in single GGC run: 18950k
    Garbage: 477960k
    Leak: 57428k
    Overhead: 75178k
    GGC runs: 568

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 105353k
    Peak memory use before GGC: 87324k
    Peak memory use after GGC: 86200k
    Maximum of released memory in single GGC run: 19399k
    Garbage: 483127k
    Leak: 57613k
    Overhead: 75845k
    GGC runs: 558

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-03-12 11:50:11.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-03-12 16:20:57.000000000 +0000
@@ -1,3 +1,28 @@
+2005-03-12  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-ssa.c (kill_redundant_phi_nodes): Remove local variable
+	var.
+
+	* tree-ssa-phiopt.c (tree_ssa_phiopt): Remove local variable
+	removed_phis.
+
+	* tree-ssa-pre.c (compute_avail): Remove local variable val.
+	(mark_operand_necessary): Remove local variable ver.
+
+	* tree-vect-transform.c (vect_get_new_vect_var): Remove local
+	variable prefix_len.
+
+	* value-prof.c (mod_subtract_transform): Remove local variable
+	value.
+
+	* builtins.c (fold_builtin_exponent): Take decomposed
+	arguments of CALL_EXPR.
+	(fold_builtin_1): Update a call to fold_builtin_exponent.
+
+	* builtins.c (fold_builtin_logarithm): Take decomposed
+	arguments of CALL_EXPR.
+	(fold_builtin_1): Update a call to fold_builtin_logarithm.
+
 2005-03-12  Geoffrey Keating  <geoffk@apple.com>
 
 	* c-lex.c (c_lex_with_flags): Add parameter to call to 

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