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]

GCC memory consumption increased by recent patch!


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: 25253k
    Peak memory use before GGC: 9310k
    Peak memory use after GGC: 8624k
    Maximum of released memory in single GGC run: 2912k
    Garbage: 42433k
    Leak: 6088k
    Overhead: 5717k
    GGC runs: 353

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26113k -> 26077k
    Peak memory use before GGC: 9199k -> 9198k
    Peak memory use after GGC: 8723k -> 8720k
    Maximum of released memory in single GGC run: 2062k -> 2060k
    Garbage: 67980k -> 68024k
    Leak: 6484k -> 6484k
    Overhead: 10665k -> 10667k
    GGC runs: 545

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 82167k to 82249k, overall 0.10%
    Overall memory needed: 29901k -> 29877k
    Peak memory use before GGC: 12705k
    Peak memory use after GGC: 12578k
    Maximum of released memory in single GGC run: 2574k
    Garbage: 82167k -> 82249k
    Leak: 6301k -> 6301k
    Overhead: 14822k -> 14829k
    GGC runs: 547

comparing combine.c compilation at -O3 level:
    Overall memory needed: 20744k -> 20724k
    Peak memory use before GGC: 12987k
    Peak memory use after GGC: 12578k
    Maximum of released memory in single GGC run: 3409k -> 3408k
    Garbage: 111090k -> 111192k
    Leak: 6848k -> 6848k
    Overhead: 19898k -> 19907k
    GGC runs: 614

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118468k
    Peak memory use before GGC: 79386k
    Peak memory use after GGC: 46137k
    Maximum of released memory in single GGC run: 43335k
    Garbage: 161982k
    Leak: 10609k
    Overhead: 21242k
    GGC runs: 296

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 130048k -> 129432k
    Peak memory use before GGC: 85238k -> 83952k
    Peak memory use after GGC: 70037k -> 70040k
    Maximum of released memory in single GGC run: 41104k
    Garbage: 449183k -> 445754k
    Leak: 10955k
    Overhead: 79605k -> 79294k
    GGC runs: 430

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 154176k -> 153916k
    Peak memory use before GGC: 101250k -> 99964k
    Peak memory use after GGC: 85450k -> 85453k
    Maximum of released memory in single GGC run: 42091k
    Garbage: 496074k -> 492646k
    Leak: 10875k
    Overhead: 87880k -> 87569k
    GGC runs: 364

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 154188k -> 154056k
    Peak memory use before GGC: 101252k -> 99966k
    Peak memory use after GGC: 85452k -> 85455k
    Maximum of released memory in single GGC run: 42091k
    Garbage: 497353k -> 493925k
    Leak: 10920k
    Overhead: 88061k -> 87750k
    GGC runs: 372

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 113400k
    Peak memory use before GGC: 89918k
    Peak memory use after GGC: 89024k
    Maximum of released memory in single GGC run: 19896k
    Garbage: 248717k
    Leak: 57790k
    Overhead: 45380k
    GGC runs: 362

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 95920k
    Peak memory use before GGC: 88914k
    Peak memory use after GGC: 87941k
    Maximum of released memory in single GGC run: 19401k
    Garbage: 552907k -> 552625k
    Leak: 59825k -> 59826k
    Overhead: 115305k -> 115282k
    GGC runs: 613 -> 612

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 95920k
    Peak memory use before GGC: 88915k
    Peak memory use after GGC: 87942k
    Maximum of released memory in single GGC run: 19402k
    Garbage: 601898k -> 601968k
    Leak: 60407k -> 60407k
    Overhead: 137374k -> 137369k
    GGC runs: 653 -> 651

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 98272k -> 98292k
    Peak memory use before GGC: 90311k
    Peak memory use after GGC: 88774k
    Maximum of released memory in single GGC run: 20091k
    Garbage: 641771k -> 641842k
    Leak: 60746k -> 60738k
    Overhead: 148779k -> 148762k
    GGC runs: 646 -> 645

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-12-13 13:39:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-12-13 18:16:27.000000000 +0000
@@ -1,3 +1,25 @@
+2004-12-13  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* c-common.c (fname_as_string): Free namep if we are returning
+	cstr.text.
+
+	* tree-ssa-dom.c (record_edge_info): Fix memory leak.
+
+2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
+
+	* tree-cfg.c (remove_useless_stmts_cond): Call fold on COND_EXPR_COND.
+
+2004-12-13  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-ssa-dom.c (record_equivalences_from_phis): Speed up by
+	doing a pointer comparison.
+
+	* tree-ssa-dom.c (record_equivalences_from_phis): Add a
+	comment.
+
+	* defaults.h, stmt.c, tree-cfg.c, tree-ssa-dce.c: Fix comment
+	typos.
+
 2004-12-13  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
 
 	* config/m32r/t-linux (SHLIB_MAPFILES): Add libgcc-glibc.ver 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]