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: 18277k -> 18273k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 422k
    Leak: 2271k
    Overhead: 446k
    GGC runs: 3

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 18293k -> 18289k
    Peak memory use before GGC: 2260k
    Peak memory use after GGC: 1967k
    Maximum of released memory in single GGC run: 293k
    Garbage: 425k
    Leak: 2303k
    Overhead: 450k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 18377k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 427k
    Leak: 2274k
    Overhead: 446k
    GGC runs: 4

comparing empty function compilation at -O2 level:
    Overall memory needed: 18389k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 431k
    Leak: 2274k
    Overhead: 447k
    GGC runs: 4

comparing empty function compilation at -O3 level:
    Overall memory needed: 18389k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 431k
    Leak: 2274k
    Overhead: 447k
    GGC runs: 4

comparing combine.c compilation at -O0 level:
    Overall memory needed: 28481k -> 28477k
    Peak memory use before GGC: 9315k
    Peak memory use after GGC: 8854k
    Maximum of released memory in single GGC run: 2666k
    Garbage: 36864k
    Leak: 6466k
    Overhead: 4873k
    GGC runs: 280

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 30577k -> 30573k
    Peak memory use before GGC: 10884k
    Peak memory use after GGC: 10514k
    Maximum of released memory in single GGC run: 2415k
    Garbage: 37428k
    Leak: 9358k
    Overhead: 5574k
    GGC runs: 272

comparing combine.c compilation at -O1 level:
    Overall memory needed: 40309k -> 40305k
    Peak memory use before GGC: 17308k
    Peak memory use after GGC: 17133k
    Maximum of released memory in single GGC run: 2329k
    Garbage: 57501k
    Leak: 6514k
    Overhead: 6232k
    GGC runs: 355

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29810k
    Peak memory use before GGC: 17302k
    Peak memory use after GGC: 17131k
    Maximum of released memory in single GGC run: 2870k
    Garbage: 74941k -> 74943k
    Leak: 6619k -> 6619k
    Overhead: 8486k -> 8486k
    GGC runs: 412

comparing combine.c compilation at -O3 level:
    Overall memory needed: 28910k -> 28890k
    Peak memory use before GGC: 18429k
    Peak memory use after GGC: 17857k
    Maximum of released memory in single GGC run: 4097k -> 4101k
    Garbage: 112654k -> 112639k
    Leak: 6677k -> 6681k
    Overhead: 13026k -> 13025k
    GGC runs: 462

    Overall memory needed: 28481k -> 28477k
    Peak memory use before GGC: 9315k
    Peak memory use after GGC: 8854k
    Maximum of released memory in single GGC run: 2666k
    Garbage: 36864k
    Leak: 6466k
    Overhead: 4873k
    GGC runs: 280

comparing combine.c compilation at -O1 level:
    Overall memory needed: 40309k -> 40305k
    Peak memory use before GGC: 17308k
    Peak memory use after GGC: 17133k
    Maximum of released memory in single GGC run: 2329k
    Garbage: 57501k
    Leak: 6514k
    Overhead: 6232k
    GGC runs: 355

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29810k
    Peak memory use before GGC: 17302k
    Peak memory use after GGC: 17131k
    Maximum of released memory in single GGC run: 2870k
    Garbage: 74941k -> 74943k
    Leak: 6619k -> 6619k
    Overhead: 8486k -> 8486k
    GGC runs: 412

comparing combine.c compilation at -O3 level:
    Overall memory needed: 28910k -> 28890k
    Peak memory use before GGC: 18429k
    Peak memory use after GGC: 17857k
    Maximum of released memory in single GGC run: 4097k -> 4101k
    Garbage: 112654k -> 112639k
    Leak: 6677k -> 6681k
    Overhead: 13026k -> 13025k
    GGC runs: 462

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 88246k
    Peak memory use before GGC: 69796k
    Peak memory use after GGC: 44206k
    Maximum of released memory in single GGC run: 36964k
    Garbage: 129330k
    Leak: 9283k
    Overhead: 17004k
    GGC runs: 216

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 89426k
    Peak memory use before GGC: 70957k
    Peak memory use after GGC: 45473k
    Maximum of released memory in single GGC run: 36965k
    Garbage: 130486k
    Leak: 10990k
    Overhead: 17399k
    GGC runs: 212

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 112894k -> 114186k
    Peak memory use before GGC: 90381k
    Peak memory use after GGC: 83743k
    Maximum of released memory in single GGC run: 31852k
    Garbage: 277793k
    Leak: 9361k
    Overhead: 29779k
    GGC runs: 221

comparing insn-attrtab.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 124546k to 129362k, overall 3.87%
    Overall memory needed: 124546k -> 129362k
    Peak memory use before GGC: 92610k
    Peak memory use after GGC: 84722k
    Maximum of released memory in single GGC run: 30397k
    Garbage: 317215k -> 317211k
    Leak: 9363k
    Overhead: 36358k -> 36357k
    GGC runs: 243

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 124558k
    Peak memory use before GGC: 92636k
    Peak memory use after GGC: 84749k
    Maximum of released memory in single GGC run: 30586k -> 30585k
    Garbage: 318072k -> 318064k
    Leak: 9366k
    Overhead: 36593k -> 36592k
    GGC runs: 247

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 119894k
    Peak memory use before GGC: 93337k
    Peak memory use after GGC: 92402k
    Maximum of released memory in single GGC run: 19428k
    Garbage: 208315k
    Leak: 47803k
    Overhead: 21149k
    GGC runs: 409

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 133514k
    Peak memory use before GGC: 106742k
    Peak memory use after GGC: 105679k
    Maximum of released memory in single GGC run: 20492k
    Garbage: 214897k
    Leak: 71322k
    Overhead: 27054k
    GGC runs: 380

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 119526k
    Peak memory use before GGC: 98312k
    Peak memory use after GGC: 96027k
    Maximum of released memory in single GGC run: 18671k
    Garbage: 447491k
    Leak: 49669k
    Overhead: 32850k
    GGC runs: 559

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 119402k
    Peak memory use before GGC: 98127k
    Peak memory use after GGC: 95842k
    Maximum of released memory in single GGC run: 18694k
    Garbage: 505474k -> 505480k
    Leak: 50337k
    Overhead: 39829k -> 39829k
    GGC runs: 619

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 119462k
    Peak memory use before GGC: 98103k
    Peak memory use after GGC: 97129k
    Maximum of released memory in single GGC run: 19074k
    Garbage: 527629k -> 527629k
    Leak: 50311k
    Overhead: 40992k -> 40993k
    GGC runs: 628

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 137966k
    Peak memory use before GGC: 81913k
    Peak memory use after GGC: 58793k
    Maximum of released memory in single GGC run: 45494k
    Garbage: 147248k
    Leak: 7541k
    Overhead: 25306k
    GGC runs: 82

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 138138k
    Peak memory use before GGC: 82559k
    Peak memory use after GGC: 59439k
    Maximum of released memory in single GGC run: 45559k
    Garbage: 147419k
    Leak: 9309k
    Overhead: 25801k
    GGC runs: 88

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 428002k -> 427910k
    Peak memory use before GGC: 206841k
    Peak memory use after GGC: 202617k
    Maximum of released memory in single GGC run: 101927k
    Garbage: 291921k
    Leak: 30049k
    Overhead: 31503k
    GGC runs: 99

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 351542k -> 351818k
    Peak memory use before GGC: 206006k
    Peak memory use after GGC: 201782k
    Maximum of released memory in single GGC run: 108819k
    Garbage: 370509k
    Leak: 30372k
    Overhead: 47028k
    GGC runs: 110

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 780930k
    Peak memory use before GGC: 314929k
    Peak memory use after GGC: 293272k
    Maximum of released memory in single GGC run: 165210k
    Garbage: 514857k
    Leak: 45424k
    Overhead: 59887k
    GGC runs: 98

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2006-11-29 07:51:27.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2006-11-29 16:08:05.000000000 +0000
@@ -1,3 +1,46 @@
+2006-11-29  Duncan Sands  <baldrick@free.fr>
+
+	PR tree-optimization/23744
+	* tree-vrp.c (vrp_meet): do not require ranges to intersect.
+
+2006-11-29  Duncan Sands  <baldrick@free.fr>
+
+	PR tree-optimization/23744
+	* testsuite/gcc.dg/tree-ssa/pr23744.c: new test.
+
+2006-11-29  Duncan Sands  <baldrick@free.fr>
+
+	PR tree-optimization/23744
+	* testsuite/gcc.dg/tree-ssa/update-threading.c: xfail.
+
+2006-11-29  Jie Zhang  <jie.zhang@analog.com>
+
+	* doc/tm.texi (NO_PROFILE_COUNTERS): Document more accurately.
+
+2006-11-29  J"orn Rennecke  <joern.rennecke@st.com>
+
+	* sh.opt (minline-ic_invalidate): New option.
+	(musermode): Adjust comment.
+	* sh.c (sh_initialize_trampoline): Emit library call unless
+	is set; if it is set, don't emit library call if we can use icbi
+	instead.
+	* sh.md (ic_invalidate_line, ic_invalidate_line_sh4a): Also use
+	icbi for TARGET_SH4_300.
+	* t-sh (LIB1ASMFUNCS_CACHE): Set.
+	* doc/invoke.texi: Document -minline-ic_invalidate; Update
+	-musermode documentation.
+
+2006-11-29  Jim Tison  <jtison@us.ibm.com>
+
+	* gthr-tpf.h (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION,
+	__gthread_recursive_mutex_init): Define.
+
+2006-11-29  Joseph Myers  <joseph@codesourcery.com>
+
+	* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): If
+	STRICT_ALIGNMENT and the type is more aligned than the saved
+	registers, copy via a temporary.
+
 2006-11-28  Andrew Pinski  <pinskia@gmail.com>
 
 	PR tree-opt/29984
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2006-11-29 03:43:20.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2006-11-29 16:08:05.000000000 +0000
@@ -1,3 +1,12 @@
+2006-11-29  Lee Millward  <lee.millward@codesourcery.com> 
+
+	PR c++/29022
+	* parser.c (cp_parser_class_head): Move processing
+	of any base classes to...
+	(cp_parser_class_specifier) ...here. Take an extra
+	tree* parameter for any base classes. Only process
+	them if the opening brace was found.
+	
 2006-11-28  Jakub Jelinek  <jakub@redhat.com>
 
 	PR c++/29735


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]