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 empty function compilation at -O0 level:
    Overall memory needed: 18337k
    Peak memory use before GGC: 2263k
    Peak memory use after GGC: 1954k
    Maximum of released memory in single GGC run: 309k
    Garbage: 444k
    Leak: 2287k
    Overhead: 455k
    GGC runs: 3

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 18353k
    Peak memory use before GGC: 2291k
    Peak memory use after GGC: 1981k
    Maximum of released memory in single GGC run: 310k
    Garbage: 447k
    Leak: 2320k
    Overhead: 460k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 18445k
    Peak memory use before GGC: 2263k
    Peak memory use after GGC: 1954k
    Maximum of released memory in single GGC run: 309k
    Garbage: 450k
    Leak: 2290k
    Overhead: 456k
    GGC runs: 4

comparing empty function compilation at -O2 level:
    Overall memory needed: 18457k
    Peak memory use before GGC: 2264k
    Peak memory use after GGC: 1954k
    Maximum of released memory in single GGC run: 310k
    Garbage: 453k
    Leak: 2290k
    Overhead: 456k
    GGC runs: 4

comparing empty function compilation at -O3 level:
    Overall memory needed: 18457k
    Peak memory use before GGC: 2264k
    Peak memory use after GGC: 1954k
    Maximum of released memory in single GGC run: 310k
    Garbage: 453k
    Leak: 2290k
    Overhead: 456k
    GGC runs: 4

comparing combine.c compilation at -O0 level:
    Overall memory needed: 28613k -> 28617k
    Peak memory use before GGC: 9311k
    Peak memory use after GGC: 8864k
    Maximum of released memory in single GGC run: 2605k
    Garbage: 37287k
    Leak: 6538k
    Overhead: 4829k
    GGC runs: 277

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 30665k -> 30669k
    Peak memory use before GGC: 10894k
    Peak memory use after GGC: 10523k
    Maximum of released memory in single GGC run: 2365k
    Garbage: 37869k
    Leak: 9414k
    Overhead: 5530k
    GGC runs: 271

comparing combine.c compilation at -O1 level:
    Overall memory needed: 33538k
    Peak memory use before GGC: 20886k -> 20881k
    Peak memory use after GGC: 20677k -> 20647k
    Maximum of released memory in single GGC run: 2262k
    Garbage: 55506k -> 55411k
    Leak: 6565k -> 6565k
    Overhead: 9978k -> 9964k
    GGC runs: 353

comparing combine.c compilation at -O2 level:
    Overall memory needed: 33538k
    Peak memory use before GGC: 20910k
    Peak memory use after GGC: 20700k
    Maximum of released memory in single GGC run: 2202k -> 2203k
    Garbage: 71514k -> 71363k
    Leak: 6695k -> 6695k
    Overhead: 11897k -> 11872k
    GGC runs: 406

comparing combine.c compilation at -O3 level:
    Overall memory needed: 32766k
    Peak memory use before GGC: 21967k -> 21949k
    Peak memory use after GGC: 21362k -> 21344k
    Maximum of released memory in single GGC run: 3135k -> 3136k
    Garbage: 104613k -> 104469k
    Leak: 6768k -> 6768k
    Overhead: 16596k -> 16581k
    GGC runs: 464 -> 463

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 89190k
    Peak memory use before GGC: 70731k
    Peak memory use after GGC: 44749k
    Maximum of released memory in single GGC run: 37356k
    Garbage: 131555k
    Leak: 9579k
    Overhead: 16626k
    GGC runs: 210

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 90366k
    Peak memory use before GGC: 71892k
    Peak memory use after GGC: 46017k
    Maximum of released memory in single GGC run: 37356k
    Garbage: 132720k
    Leak: 11268k
    Overhead: 17020k
    GGC runs: 209

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 100702k -> 100710k
    Peak memory use before GGC: 75640k
    Peak memory use after GGC: 71772k -> 71771k
    Maximum of released memory in single GGC run: 31284k -> 31283k
    Garbage: 229017k -> 229008k
    Leak: 9404k -> 9404k
    Overhead: 29492k -> 29491k
    GGC runs: 219

comparing insn-attrtab.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 107422k to 117058k, overall 8.97%
    Overall memory needed: 107422k -> 117058k
    Peak memory use before GGC: 83327k -> 83326k
    Peak memory use after GGC: 77491k
    Maximum of released memory in single GGC run: 29572k
    Garbage: 280842k -> 280830k
    Leak: 9401k -> 9401k
    Overhead: 35350k -> 35348k
    GGC runs: 241

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 107450k -> 107446k
    Peak memory use before GGC: 83367k
    Peak memory use after GGC: 77531k
    Maximum of released memory in single GGC run: 29760k -> 29748k
    Garbage: 281673k -> 281559k
    Leak: 9406k -> 9405k
    Overhead: 35580k -> 35562k
    GGC runs: 242 -> 241

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 119830k
    Peak memory use before GGC: 93043k
    Peak memory use after GGC: 92119k
    Maximum of released memory in single GGC run: 18913k
    Garbage: 208221k
    Leak: 49014k
    Overhead: 21199k
    GGC runs: 407

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 132298k
    Peak memory use before GGC: 105317k
    Peak memory use after GGC: 104273k
    Maximum of released memory in single GGC run: 18749k
    Garbage: 214812k
    Leak: 72442k
    Overhead: 27105k
    GGC runs: 382

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 139602k
    Peak memory use before GGC: 112866k -> 112863k
    Peak memory use after GGC: 111746k
    Maximum of released memory in single GGC run: 17926k
    Garbage: 437399k -> 437281k
    Leak: 51042k -> 51041k
    Overhead: 99333k -> 99330k
    GGC runs: 585 -> 586

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 139650k
    Peak memory use before GGC: 112892k -> 112891k
    Peak memory use after GGC: 111774k
    Maximum of released memory in single GGC run: 17926k
    Garbage: 491488k -> 491348k
    Leak: 52007k
    Overhead: 58595k -> 58590k
    GGC runs: 632

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 141518k
    Peak memory use before GGC: 114674k -> 114672k
    Peak memory use after GGC: 113482k
    Maximum of released memory in single GGC run: 18326k
    Garbage: 511991k -> 511828k
    Leak: 51976k
    Overhead: 58665k -> 58659k
    GGC runs: 644

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 137646k
    Peak memory use before GGC: 81607k
    Peak memory use after GGC: 58486k
    Maximum of released memory in single GGC run: 44560k
    Garbage: 148154k
    Leak: 8080k
    Overhead: 25066k
    GGC runs: 81

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 138198k
    Peak memory use before GGC: 82252k
    Peak memory use after GGC: 59132k
    Maximum of released memory in single GGC run: 44208k
    Garbage: 148372k
    Leak: 9335k
    Overhead: 25561k
    GGC runs: 89

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 417830k -> 417814k
    Peak memory use before GGC: 200847k
    Peak memory use after GGC: 193545k
    Maximum of released memory in single GGC run: 112452k
    Garbage: 282084k
    Leak: 29804k
    Overhead: 32000k
    GGC runs: 91

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 342206k -> 342298k
    Peak memory use before GGC: 200842k
    Peak memory use after GGC: 193540k
    Maximum of released memory in single GGC run: 111878k
    Garbage: 359138k
    Leak: 30387k
    Overhead: 47155k
    GGC runs: 101

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 923250k -> 923342k
    Peak memory use before GGC: 317309k
    Peak memory use after GGC: 295751k
    Maximum of released memory in single GGC run: 168455k
    Garbage: 494906k
    Leak: 45439k
    Overhead: 59089k
    GGC runs: 97

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2007-01-09 16:31:35.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2007-01-10 07:25:09.000000000 +0000
@@ -1,3 +1,34 @@
+2007-01-10  Sa Liu  <saliu@de.ibm.com>
+	    Ben Elliston  <bje@au.ibm.com>
+
+	* spu.h (STACK_SAVE_AREA): Use VOIDmode for SAVE_FUNCTION, SImode
+	for SAVE_NONLOCAL and Pmode for any other save level.
+	* spu-protos.h (spu_restore_stack_block): Declare.
+	* spu.md (save_stack_block): Remove.
+	(restore_stack_block): Call spu_restore_stack_block.
+	* spu.c (spu_restore_stack_block): New function.
+	(spu_expand_epilogue): Remove old comment.
+
+2007-01-09  Zdenek Dvorak <dvorakz@suse.cz>
+
+	PR tree-optimization/30322
+	* tree-ssa-loop-ivopts.c (fold_affine_expr, iv_value): Removed.
+	(cand_value_at): Return the value as aff_tree.
+	(may_eliminate_iv): Convert the bound from aff_tree to tree.
+	* tree-affine.c (aff_combination_add_cst, aff_combination_add_product,
+	aff_combination_mult): New functions.
+	(aff_combination_add): Use aff_combination_add_cst.
+	(aff_combination_convert): Allow conversions to a wider type.
+	(tree_to_aff_combination): Handle BIT_NOT_EXPR.
+	* tree-affine.h (aff_combination_mult): Declare.
+
+2007-01-09  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* doc/tm.texi: Update documentation to reflect reality of exec
+	and start file search behaviours. Update copyright year.
+	* doc/invoke.texi: Explain how GCC_EXEC_PREFIX is used to find
+	header file directories.
+
 2007-01-09  Uros Bizjak  <ubizjak@gmail.com>
 
 	* config/i386/i386.md (*sinxf2): Rename to *sinxf2_i387.


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]