Some aspect of GCC memory consumption increased by recent patch

gcctest@suse.de gcctest@suse.de
Sat Sep 4 11:43: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 amount of GGC memory allocated before garbage collecting run decreased from 13550k to 12103k, overall -11.96%
Peak amount of GGC memory still allocated after garbage collecting decreased from 13072k to 11625k, overall -12.45%
Amount of produced GGC garbage increased from 41398k to 42987k, overall 3.84%
Amount of memory still referenced at the end of compilation decreased from 12542k to 10894k, overall -15.13%
Peak memory use before GGC: 13550k -> 12103k
Peak memory use after GGC: 13072k -> 11625k
Maximum of released memory in single GGC run: 1678k -> 2367k
Garbage: 41398k -> 42987k
Leak: 10894k -> 12542k
Overhead: 5808k -> 5810k
GGC runs: 444 -> 447

comparing combine.c compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting run decreased from 12253k to 11100k, overall -10.39%
Peak amount of GGC memory still allocated after garbage collecting decreased from 11576k to 10423k, overall -11.06%
Amount of produced GGC garbage increased from 78346k to 79684k, overall 1.71%
Amount of memory still referenced at the end of compilation decreased from 11181k to 9880k, overall -13.17%
Peak memory use before GGC: 12253k -> 11100k
Peak memory use after GGC: 11576k -> 10423k
Maximum of released memory in single GGC run: 1296k -> 1726k
Garbage: 78346k -> 79684k
Leak: 9880k -> 11181k
Overhead: 13216k -> 13224k
GGC runs: 639 -> 655

comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 94235k to 95699k, overall 1.55%
Amount of memory still referenced at the end of compilation decreased from 11414k to 9921k, overall -15.05%
Peak memory use before GGC: 13886k -> 13544k
Peak memory use after GGC: 13158k -> 13159k
Maximum of released memory in single GGC run: 2103k -> 2104k
Garbage: 94235k -> 95699k
Leak: 9921k -> 11414k
Overhead: 18923k -> 18927k
GGC runs: 657 -> 665

comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting run decreased from 18007k to 17430k, overall -3.31%
Peak amount of GGC memory still allocated after garbage collecting decreased from 15982k to 15405k, overall -3.75%
Amount of produced GGC garbage increased from 122044k to 124345k, overall 1.89%
Amount of memory still referenced at the end of compilation decreased from 14219k to 12005k, overall -18.45%
Peak memory use before GGC: 18007k -> 17430k
Peak memory use after GGC: 15982k -> 15405k
Maximum of released memory in single GGC run: 2306k -> 3011k
Garbage: 122044k -> 124345k
Leak: 12005k -> 14219k
Overhead: 25985k -> 26001k
GGC runs: 718 -> 721

comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak memory use before GGC: 93181k -> 93182k
Peak memory use after GGC: 91692k -> 91693k
Maximum of released memory in single GGC run: 20289k -> 20289k
Garbage: 255123k -> 255126k
Leak: 72852k -> 72853k
Overhead: 34609k -> 34609k
GGC runs: 539 -> 539

comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak memory use before GGC: 97173k -> 97174k
Peak memory use after GGC: 90560k -> 90561k
Maximum of released memory in single GGC run: 19489k -> 19489k
Garbage: 624588k -> 624683k
Leak: 88860k -> 88955k
Overhead: 142562k -> 142562k
GGC runs: 793 -> 794

comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak memory use before GGC: 97173k -> 97174k
Peak memory use after GGC: 90560k -> 90561k
Maximum of released memory in single GGC run: 19488k -> 19488k
Garbage: 690402k -> 690423k
Leak: 87884k -> 87891k
Overhead: 165707k -> 165707k
GGC runs: 841 -> 841

comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak memory use before GGC: 92862k -> 92863k
Peak memory use after GGC: 91394k -> 91395k
Maximum of released memory in single GGC run: 20194k -> 20194k
Garbage: 729966k -> 729988k
Leak: 89010k -> 89020k
Overhead: 184794k -> 184792k
GGC runs: 847 -> 847

Head of changelog is:


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