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: 24997k -> 25001k
    Peak memory use before GGC: 9600k
    Peak memory use after GGC: 8947k
    Maximum of released memory in single GGC run: 2737k
    Garbage: 40126k
    Leak: 6666k
    Overhead: 5745k
    GGC runs: 317

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26824k
    Peak memory use before GGC: 17369k
    Peak memory use after GGC: 17185k
    Maximum of released memory in single GGC run: 2372k
    Garbage: 60909k
    Leak: 6848k
    Overhead: 7555k
    GGC runs: 389

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26824k
    Peak memory use before GGC: 17370k
    Peak memory use after GGC: 17185k
    Maximum of released memory in single GGC run: 2454k
    Garbage: 77572k -> 77595k
    Leak: 6934k -> 6940k
    Overhead: 9995k -> 9997k
    GGC runs: 457 -> 458

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 7011k to 7022k, overall 0.16%
    Overall memory needed: 26824k
    Peak memory use before GGC: 18371k -> 18373k
    Peak memory use after GGC: 18001k -> 18002k
    Maximum of released memory in single GGC run: 3521k
    Garbage: 108281k -> 108326k
    Leak: 7011k -> 7022k
    Overhead: 13569k -> 13575k
    GGC runs: 510

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 80920k
    Peak memory use before GGC: 69474k
    Peak memory use after GGC: 45012k
    Maximum of released memory in single GGC run: 36247k
    Garbage: 146439k
    Leak: 10057k
    Overhead: 19752k
    GGC runs: 251

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 112088k
    Peak memory use before GGC: 94462k
    Peak memory use after GGC: 83561k
    Maximum of released memory in single GGC run: 32588k
    Garbage: 296189k
    Leak: 10036k
    Overhead: 36707k
    GGC runs: 247

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 125656k
    Peak memory use before GGC: 111816k -> 111817k
    Peak memory use after GGC: 83473k -> 83518k
    Maximum of released memory in single GGC run: 32177k -> 32173k
    Garbage: 381050k -> 381080k
    Leak: 10137k -> 10142k
    Overhead: 48222k -> 48227k
    GGC runs: 275

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 125704k
    Peak memory use before GGC: 111846k -> 111847k
    Peak memory use after GGC: 83503k -> 83548k
    Maximum of released memory in single GGC run: 32502k -> 32497k
    Garbage: 381633k -> 381664k
    Leak: 10141k -> 10147k
    Overhead: 48374k -> 48379k
    GGC runs: 277

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118388k
    Peak memory use before GGC: 95146k
    Peak memory use after GGC: 94197k
    Maximum of released memory in single GGC run: 20461k
    Garbage: 223584k
    Leak: 49220k
    Overhead: 36701k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 105528k
    Peak memory use before GGC: 95273k
    Peak memory use after GGC: 93199k
    Maximum of released memory in single GGC run: 20342k
    Garbage: 567532k
    Leak: 54986k
    Overhead: 67978k
    GGC runs: 522

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106516k -> 106536k
    Peak memory use before GGC: 95274k
    Peak memory use after GGC: 93199k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 649396k -> 649658k
    Leak: 55767k -> 55809k
    Overhead: 79006k -> 79025k
    GGC runs: 585 -> 586

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 109436k -> 109528k
    Peak memory use before GGC: 96742k
    Peak memory use after GGC: 94277k
    Maximum of released memory in single GGC run: 20839k
    Garbage: 708198k -> 708249k
    Leak: 57028k -> 57066k
    Overhead: 83986k -> 83994k
    GGC runs: 593

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-12-07 19:20:34.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-12-08 05:39:50.000000000 +0000
@@ -1,3 +1,45 @@
+2005-12-07  J"orn Rennecke <joern.rennecke@st.com>
+
+	* expr.c (force_operand): Use convert_to_mode for conversions.
+
+2005-12-07  J"orn Rennecke <joern.rennecke@st.com>
+
+	* reload.h (reg_equiv_invariant): Declare.
+	* reload.c (refers_to_regno_for_reload_p): Allow R to be a pseudo
+	register also when reg_equiv_invariant[R] is set.
+
+2005-12-07  Richard Sandiford  <richard@codesourcery.com>
+	    Andreas Tobler  <a.tobler@schweiz.ch>
+
+	* config/darwin.h: Guard section variables with #ifndef USED_FOR_TARGET.
+
+2005-12-07  Daniel Berlin  <dberlin@dberlin.org>
+
+	* tree-ssa-pre.c (bitmap_set_and): New function.
+	(bitmap_set_and_compl): New function.
+	(bitmap_set_empty_p): New function.
+	(insert_extra_phis): New function.
+	(compute_avail): Use insert_extra_phis.
+
+2005-12-07  Adrian Straetling  <straetling@de.ibm.com>
+
+	* config/s390/s390.c (s390_expand_atomic): New function.
+	Adjust comment of helper functions.
+	* config/s390/s390-protos.h (s390_expand_atomic): Declare.
+	* config/s390/s390.md ("ATOMIC"): New code macro.
+	("atomic"): Corresponding new code attribute.
+	("sync_lock_test_and_set[hq]i", 
+	"sync_{new_,old_,}{and,ior,xor,add,sub,nand}[hq]i"): New pattern.
+
+2005-12-07  Adrian Straetling  <straetling@de.ibm.com>
+
+	* config/s390/s390.c (s390_expand_mask_and_shift, 
+	struct alignment_context, init_alignment_context, 
+	s390_expand_cs_hqi): New.
+	* config/s390/s390-protos.h (s390_expand_cs_hqi): Declare.
+	* config/s390/s390.md ("sync_compare_and_swaphi",
+	"sync_compare_and_swapqi"): New pattern.
+
 2005-12-07  Daniel Berlin <dberlin@dberlin.org>
 
 	Fix PR tree-optimization/25291
@@ -9646,7 +9688,7 @@
 	Use CCZ1mode instead of CCZmode.
 	* config/s390/s390-modes.def: Add CCZ1mode.  Comment new mode.
 
-2006-07-13  Adrian Strae½tling  <straetling@de.ibm.com>
+2005-07-13  Adrian Strae½tling  <straetling@de.ibm.com>
 
 	* config/s390/s390.md: ("cmpstrsi", "*cmpstr<mode>"): New
 	pattern.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2005-12-07 19:20:32.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2005-12-08 05:39:50.000000000 +0000
@@ -1,3 +1,11 @@
+2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+	* expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
+
+2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+	* cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
+
 2005-12-07  Rafael ?vila de Esp?ndola  <rafael.espindola@gmail.com>
 
 	* Make-lang.in (c++.all.build, c++.install-normal): Remove.


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]