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: 24873k -> 24869k
    Peak memory use before GGC: 9590k
    Peak memory use after GGC: 8937k
    Maximum of released memory in single GGC run: 2737k
    Garbage: 40087k -> 40100k
    Leak: 6698k -> 6698k
    Overhead: 5787k -> 5787k
    GGC runs: 316

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26812k
    Peak memory use before GGC: 17359k
    Peak memory use after GGC: 17173k
    Maximum of released memory in single GGC run: 2373k
    Garbage: 60379k -> 60378k
    Leak: 7081k -> 7081k
    Overhead: 7596k -> 7596k
    GGC runs: 385

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26812k
    Peak memory use before GGC: 17361k
    Peak memory use after GGC: 17173k
    Maximum of released memory in single GGC run: 2454k -> 2453k
    Garbage: 77482k -> 77463k
    Leak: 7476k -> 7476k
    Overhead: 10088k -> 10083k
    GGC runs: 457

comparing combine.c compilation at -O3 level:
    Overall memory needed: 26812k
    Peak memory use before GGC: 18470k -> 18469k
    Peak memory use after GGC: 18099k
    Maximum of released memory in single GGC run: 3362k -> 3361k
    Garbage: 110518k -> 110523k
    Leak: 7565k -> 7564k
    Overhead: 13911k -> 13913k
    GGC runs: 516

comparing insn-attrtab.c compilation at -O0 level:
  Amount of produced GGC garbage increased from 146336k to 146604k, overall 0.18%
    Overall memory needed: 80920k -> 80916k
    Peak memory use before GGC: 69464k
    Peak memory use after GGC: 45002k
    Maximum of released memory in single GGC run: 36248k
    Garbage: 146336k -> 146604k
    Leak: 10091k -> 9851k
    Overhead: 19790k -> 19791k
    GGC runs: 250 -> 251

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 111880k -> 112280k
    Peak memory use before GGC: 94161k
    Peak memory use after GGC: 83708k
    Maximum of released memory in single GGC run: 32586k
    Garbage: 290030k -> 290030k
    Leak: 10077k -> 10077k
    Overhead: 36692k
    GGC runs: 245

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 127108k
    Peak memory use before GGC: 113407k
    Peak memory use after GGC: 83668k
    Maximum of released memory in single GGC run: 32200k
    Garbage: 376132k -> 376128k
    Leak: 10183k -> 10183k
    Overhead: 48586k -> 48586k
    GGC runs: 274

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 127172k -> 127168k
    Peak memory use before GGC: 113433k
    Peak memory use after GGC: 83696k -> 83695k
    Maximum of released memory in single GGC run: 32515k
    Garbage: 376678k -> 376674k
    Leak: 10199k -> 10199k
    Overhead: 48736k -> 48736k
    GGC runs: 276

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118144k
    Peak memory use before GGC: 94915k
    Peak memory use after GGC: 93968k
    Maximum of released memory in single GGC run: 20293k
    Garbage: 225923k -> 225923k
    Leak: 49143k -> 49143k
    Overhead: 36819k -> 36818k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 105432k -> 105436k
    Peak memory use before GGC: 95204k
    Peak memory use after GGC: 92602k
    Maximum of released memory in single GGC run: 20357k
    Garbage: 569831k -> 569873k
    Leak: 55385k -> 55385k
    Overhead: 67784k -> 67786k
    GGC runs: 516

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106184k -> 106192k
    Peak memory use before GGC: 95204k
    Peak memory use after GGC: 92602k
    Maximum of released memory in single GGC run: 20356k
    Garbage: 652036k -> 652061k
    Leak: 56170k -> 56166k
    Overhead: 79097k -> 79099k
    GGC runs: 582

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 109164k -> 109340k
    Peak memory use before GGC: 96495k
    Peak memory use after GGC: 94544k
    Maximum of released memory in single GGC run: 20676k
    Garbage: 708519k -> 708529k
    Leak: 57200k -> 57200k
    Overhead: 84153k -> 84153k
    GGC runs: 585

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-09-29 17:43:45.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-09-30 04:14:59.000000000 +0000
@@ -1,3 +1,24 @@
+2005-09-29  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+	PR middle-end/24053
+	* stor-layout.c (set_sizetype): Set TYPE_MAIN_VARIANT of bitsizetype.
+
+2005-09-29  Mark Mitchell  <mark@codesourcery.com>
+
+	* optabs.c (expand_binop): Initialize first_pass_p.
+
+2005-09-29  Jakub Jelinek  <jakub@redhat.com>
+
+	PR middle-end/24109
+	* c-decl.c (c_write_global_declarations_1): If any
+	wrapup_global_declaration_2 call returned true, restart the loop.
+
+2005-09-29  Daniel Berlin  <dberlin@dberlin.org>
+	
+	Fix PR tree-optimization/24117
+	* tree-ssa-structalias.c (find_func_aliases): Strip nops
+	before considering whether to use anyoffset.
+
 2005-09-29  Paolo Bonzini  <bonzini@gnu.org>
 
 	Revert this patch:


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]