GCC memory consumption decreased by recent patch

gcctest@suse.de gcctest@suse.de
Tue Sep 7 23:53:00 GMT 2004


Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:


comparing combine.c compilation at -O0 level:
Peak memory use before GGC: 12120k -> 12120k
Peak memory use after GGC: 11641k -> 11641k
Maximum of released memory in single GGC run: 2368k -> 2368k
Garbage: 42976k -> 42976k
Leak: 10910k -> 10910k
Overhead: 5810k -> 5810k
GGC runs: 447 -> 447

comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage decreased from 86991k to 80911k, overall -7.51%
Peak memory use before GGC: 11131k -> 10927k
Peak memory use after GGC: 10454k -> 10454k
Maximum of released memory in single GGC run: 1767k -> 1768k
Garbage: 86991k -> 80911k
Leak: 10006k -> 10005k
Overhead: 14999k -> 13988k
GGC runs: 668 -> 656

comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage decreased from 103099k to 96732k, overall -6.58%
Peak memory use before GGC: 13597k -> 13349k
Peak memory use after GGC: 13160k -> 13160k
Maximum of released memory in single GGC run: 2104k -> 2104k
Garbage: 103099k -> 96732k
Leak: 10025k -> 10025k
Overhead: 19895k -> 18848k
GGC runs: 674 -> 660

comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting run decreased from 17554k to 16951k, overall -3.56%
Amount of produced GGC garbage decreased from 135941k to 126751k, overall -7.25%
Peak memory use before GGC: 17554k -> 16951k
Peak memory use after GGC: 15529k -> 15529k
Maximum of released memory in single GGC run: 3047k -> 3047k
Garbage: 135941k -> 126751k
Leak: 12211k -> 12211k
Overhead: 26217k -> 24703k
GGC runs: 727 -> 719

comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak memory use before GGC: 93183k -> 93183k
Peak memory use after GGC: 91694k -> 91694k
Maximum of released memory in single GGC run: 20289k -> 20289k
Garbage: 255121k -> 255121k
Leak: 72853k -> 72853k
Overhead: 34608k -> 34608k
GGC runs: 538 -> 538

comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak memory use before GGC: 97174k -> 97174k
Peak memory use after GGC: 90561k -> 90561k
Maximum of released memory in single GGC run: 19488k -> 19488k
Garbage: 677412k -> 659747k
Leak: 90181k -> 90181k
Overhead: 147688k -> 144783k
GGC runs: 821 -> 808

comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak memory use before GGC: 97175k -> 97175k
Peak memory use after GGC: 90562k -> 90562k
Maximum of released memory in single GGC run: 19489k -> 19489k
Garbage: 744106k -> 726054k
Leak: 89222k -> 89222k
Overhead: 170449k -> 167496k
GGC runs: 867 -> 852

comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak memory use before GGC: 92864k -> 92864k
Peak memory use after GGC: 91396k -> 91396k
Maximum of released memory in single GGC run: 20194k -> 20194k
Garbage: 795872k -> 775639k
Leak: 90657k -> 90641k
Overhead: 185305k -> 182029k
GGC runs: 865 -> 848

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-09-07 19:15:46.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-09-07 23:22:18.000000000 +0000
@@ -1,3 +1,28 @@
+2004-09-07  Jan Hubicka  <jh@suse.cz>
+
+	* cse.c (fold_rtx):  Avoid building of
+	(CONST (MINUS (CONST_INT) (SYMBOL_REF)))
+
+	* tree-ssa-pre.c (grand_bitmap_obstack): New.
+	(value_insert_into_set_bitmap, bitmap_set_new): Use the obstack.
+	(init_pre): Initialize obstack.
+	(fini_pre): Free obstack.
+
+2004-09-07  David Daney  <ddaney@avtrex.com>
+
+	* config.gcc: Added support for --with-divide=[breaks|traps] for
+	mips targets.
+	* config/mips/mips.h (MASK_DIVIDE_BREAKS): New target_flags bit.
+	(TARGET_DIVIDE_TRAPS): New macro.
+	(TARGET_SWITCHES): Added -mdivide-traps and -mdivide-breaks.
+	(OPTION_DEFAULT_SPECS): Added --with-divide= support.
+	* config/mips/mips.c (mips_idiv_insns): Generate proper count on
+	GENERATE_DIVIDE_TRAPS.
+	(mips_output_division): Emit conditional trap if
+	GENERATE_DIVIDE_TRAPS is set.
+	* doc/install.texi: Document --with-divide.
+	* doc/invoke.texi: Document -mdivide-traps and -mdivide-breaks.
+
 2004-09-07  Caroline Tice  <ctice@apple.com>
 
 	* cfgrtl.c (rtl_verify_flow_info_1):  Add new edge flag,

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.



More information about the Gcc-regression mailing list