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: 24928k
    Peak memory use before GGC: 9717k
    Peak memory use after GGC: 9064k
    Maximum of released memory in single GGC run: 2816k
    Garbage: 42335k
    Leak: 6720k
    Overhead: 5837k
    GGC runs: 335

comparing combine.c compilation at -O1 level:
    Overall memory needed: 24372k -> 24364k
    Peak memory use before GGC: 17710k
    Peak memory use after GGC: 17517k
    Maximum of released memory in single GGC run: 2468k
    Garbage: 67909k -> 67910k
    Leak: 7030k
    Overhead: 8038k -> 8038k
    GGC runs: 419

comparing combine.c compilation at -O2 level:
    Overall memory needed: 24380k -> 24356k
    Peak memory use before GGC: 17718k
    Peak memory use after GGC: 17517k
    Maximum of released memory in single GGC run: 2616k
    Garbage: 87241k -> 87244k
    Leak: 7207k
    Overhead: 10768k -> 10768k
    GGC runs: 485 -> 484

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 115941k to 116180k, overall 0.21%
    Overall memory needed: 24840k
    Peak memory use before GGC: 17968k
    Peak memory use after GGC: 17549k
    Maximum of released memory in single GGC run: 3439k
    Garbage: 115941k -> 116180k
    Leak: 7305k
    Overhead: 14317k -> 14426k
    GGC runs: 534

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 83372k
    Peak memory use before GGC: 71655k
    Peak memory use after GGC: 45752k
    Maximum of released memory in single GGC run: 37689k
    Garbage: 151641k
    Leak: 11560k
    Overhead: 18881k
    GGC runs: 267

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 116668k
    Peak memory use before GGC: 99408k
    Peak memory use after GGC: 88890k
    Maximum of released memory in single GGC run: 33484k
    Garbage: 298292k
    Leak: 11427k
    Overhead: 35521k
    GGC runs: 290

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 155568k
    Peak memory use before GGC: 118554k
    Peak memory use after GGC: 88864k
    Maximum of released memory in single GGC run: 33619k
    Garbage: 392905k
    Leak: 11515k
    Overhead: 47614k
    GGC runs: 329

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 155560k
    Peak memory use before GGC: 118558k
    Peak memory use after GGC: 88866k
    Maximum of released memory in single GGC run: 33619k
    Garbage: 393708k
    Leak: 11535k
    Overhead: 47731k
    GGC runs: 334

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 124856k
    Peak memory use before GGC: 100707k
    Peak memory use after GGC: 99710k
    Maximum of released memory in single GGC run: 21552k
    Garbage: 230928k
    Leak: 53150k
    Overhead: 39837k
    GGC runs: 337

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 108900k -> 108904k
    Peak memory use before GGC: 99624k
    Peak memory use after GGC: 98632k
    Maximum of released memory in single GGC run: 20596k
    Garbage: 645616k -> 645636k
    Leak: 58288k -> 58288k
    Overhead: 80487k -> 80489k
    GGC runs: 525 -> 526

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 109488k
    Peak memory use before GGC: 99624k
    Peak memory use after GGC: 98632k
    Maximum of released memory in single GGC run: 20595k
    Garbage: 737005k -> 737014k
    Leak: 58971k -> 58971k
    Overhead: 97649k -> 97631k
    GGC runs: 589 -> 590

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 111932k -> 111984k
    Peak memory use before GGC: 101141k
    Peak memory use after GGC: 100133k
    Maximum of released memory in single GGC run: 21090k
    Garbage: 779874k -> 779881k
    Leak: 60171k -> 60171k
    Overhead: 101731k -> 101732k
    GGC runs: 595

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-07-04 05:36:18.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-07-04 20:45:03.000000000 +0000
@@ -1,3 +1,19 @@
+2005-07-04  Diego Novillo  <dnovillo@redhat.com>
+
+	* tree-iterator.h (TSI_NEW_STMT, TSI_SAME_STMT): Fix
+	comments.
+
+2005-07-04  Daniel Berlin  <dberlin@dberlin.org>
+
+	Fix PR tree-optimization/22279
+	
+	* tree-ssa-structalias.c (offset_overlaps_with_access): Use
+	correct operator.
+	
+2005-07-04  J"orn Rennecke <joern.rennecke@st.com>
+
+	* sh.c (output_ieee_ccmpeq): Replace "\\;" with "\n\t".
+
 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
 
 	* bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c,


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]