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: 28410k
    Peak memory use before GGC: 9304k
    Peak memory use after GGC: 8843k
    Maximum of released memory in single GGC run: 2666k
    Garbage: 36845k
    Leak: 6454k
    Overhead: 4862k
    GGC runs: 280

comparing combine.c compilation at -O1 level:
    Overall memory needed: 40254k
    Peak memory use before GGC: 17292k
    Peak memory use after GGC: 17117k
    Maximum of released memory in single GGC run: 2363k
    Garbage: 57577k -> 57580k
    Leak: 6517k
    Overhead: 6226k -> 6228k
    GGC runs: 355

comparing combine.c compilation at -O2 level:
  Amount of memory still referenced at the end of compilation increased from 6609k to 6617k, overall 0.12%
    Overall memory needed: 29802k
    Peak memory use before GGC: 17288k
    Peak memory use after GGC: 17117k
    Maximum of released memory in single GGC run: 2803k
    Garbage: 74893k -> 74894k
    Leak: 6609k -> 6617k
    Overhead: 8473k -> 8484k
    GGC runs: 413

comparing combine.c compilation at -O3 level:
    Overall memory needed: 28902k
    Peak memory use before GGC: 18229k
    Peak memory use after GGC: 17845k
    Maximum of released memory in single GGC run: 4104k
    Garbage: 104223k -> 104218k
    Leak: 6681k
    Overhead: 11909k -> 11918k
    GGC runs: 462

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 88242k
    Peak memory use before GGC: 69788k
    Peak memory use after GGC: 44198k
    Maximum of released memory in single GGC run: 36963k
    Garbage: 129062k
    Leak: 9514k
    Overhead: 16996k
    GGC runs: 216

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 114174k
    Peak memory use before GGC: 90374k
    Peak memory use after GGC: 83736k
    Maximum of released memory in single GGC run: 31852k
    Garbage: 277769k -> 277772k
    Leak: 9357k
    Overhead: 29780k -> 29782k
    GGC runs: 222

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 120406k -> 120410k
    Peak memory use before GGC: 92604k
    Peak memory use after GGC: 84716k
    Maximum of released memory in single GGC run: 30394k
    Garbage: 317192k -> 317194k
    Leak: 9359k
    Overhead: 36356k -> 36362k
    GGC runs: 245

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 134226k
    Peak memory use before GGC: 92629k
    Peak memory use after GGC: 84742k
    Maximum of released memory in single GGC run: 30584k
    Garbage: 317844k -> 317847k
    Leak: 9362k
    Overhead: 36554k -> 36560k
    GGC runs: 249

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 119550k
    Peak memory use before GGC: 92691k
    Peak memory use after GGC: 91771k
    Maximum of released memory in single GGC run: 19314k
    Garbage: 205599k
    Leak: 47691k
    Overhead: 20819k
    GGC runs: 401

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 119302k
    Peak memory use before GGC: 97860k
    Peak memory use after GGC: 95650k
    Maximum of released memory in single GGC run: 18600k
    Garbage: 444236k -> 444374k
    Leak: 50025k -> 50024k
    Overhead: 32786k -> 32775k
    GGC runs: 551

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 119294k
    Peak memory use before GGC: 97860k
    Peak memory use after GGC: 95650k
    Maximum of released memory in single GGC run: 18600k
    Garbage: 503803k -> 503970k
    Leak: 50729k -> 50729k
    Overhead: 40091k -> 40089k
    GGC runs: 607

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 118926k
    Peak memory use before GGC: 97906k
    Peak memory use after GGC: 96936k
    Maximum of released memory in single GGC run: 18847k
    Garbage: 523447k -> 523472k
    Leak: 50304k -> 50305k
    Overhead: 40603k -> 40592k
    GGC runs: 620 -> 619

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 137786k -> 137958k
    Peak memory use before GGC: 81909k
    Peak memory use after GGC: 58788k
    Maximum of released memory in single GGC run: 45493k
    Garbage: 147243k
    Leak: 7536k
    Overhead: 25302k
    GGC runs: 82

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 423186k -> 424262k
    Peak memory use before GGC: 205271k -> 205229k
    Peak memory use after GGC: 201047k -> 201005k
    Maximum of released memory in single GGC run: 101714k -> 101710k
    Garbage: 271706k -> 271743k
    Leak: 47601k
    Overhead: 30831k -> 31231k
    GGC runs: 101

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 352070k -> 352058k
    Peak memory use before GGC: 206012k -> 206002k
    Peak memory use after GGC: 201788k -> 201778k
    Maximum of released memory in single GGC run: 108617k
    Garbage: 351905k -> 351971k
    Leak: 48184k
    Overhead: 46575k -> 46977k
    GGC runs: 110

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 781150k -> 781334k
    Peak memory use before GGC: 314927k -> 314925k
    Peak memory use after GGC: 293270k -> 293268k
    Maximum of released memory in single GGC run: 165331k
    Garbage: 494299k -> 494373k
    Leak: 65517k
    Overhead: 59716k -> 59915k
    GGC runs: 98

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2006-11-08 11:39:57.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2006-11-09 03:16:32.000000000 +0000
@@ -1,3 +1,45 @@
+2006-11-08  Zdenek Dvorak <dvorakz@suse.cz>
+
+	PR tree-optimization/29738
+	* tree-ssa-ccp.c: Remove UNKNOWN_VAL from comments.
+	(ccp_lattice_t): Remove UNKNOWN_VAL.
+	(dump_lattice_value, ccp_lattice_meet, ccp_visit_phi_node):
+	Do not handle UNKNOWN_VAL.
+	(get_default_value): Set initial value of virtual operands to
+	VARYING.
+	(get_value): Always use get_default_value on uninitialized
+	operands.
+	(set_value_varying, surely_varying_stmt_p): New functions.
+	(set_lattice_value): Do not pass argument to get_value.
+	Do not handle UNKNOWN_VAL.
+	(likely_value): Follow the semantics described in the comment.
+	(ccp_initialize): Use surely_varying_stmt_p.  Do not mark
+	phi nodes DONT_SIMULATE_AGAIN.
+	(ccp_fold): Do not pass argument to get_value.
+	(fold_const_aggregate_ref, visit_assignment): Ditto.  Do not
+	handle UNKNOWN_VAL.
+
+2006-11-08  Andrew Pinski  <Andrew_Pinski@playstation.sony.com>
+
+	* tree-pretty-print.c (dump_generic_node) <INTEGER_CST>: Use 
+	HOST_WIDE_INT_PRINT_DOUBLE_HEX instead of format buffer.
+
+2006-11-08  Roger Sayle  <roger@eyesopen.com>
+
+	* tree-ssa-propagate.c (set_rhs): Restructure validity tests as a
+	test for inclusion rather than as a test for exclusion.
+	* tree-ssa-ccp.c (fold_stmt_r) <COND_EXPR>: Use set_rhs to modify
+	the condition after calling fold_binary.
+	* fold-const.c (fold_inf_compare): Remove in_gimple_form check.
+	(fold_binary) <LT_EXPR, GT_EXPR, LE_EXPR, GE_EXPR>: Likewise.
+	* builtins.c (fold_builtin_isascii): Likewise.
+	(fold_builtin_isdigit): Likewise.
+
+2006-11-08  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* configure.ac: Do not set PREFIX_INCLUDE_DIR if $prefix is NONE.
+	* configure: Regenerate.
+
 2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>
 
 	* tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take 


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]