A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Tue Apr 18 14:17:00 GMT 2006
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: 25056k
Peak memory use before GGC: 9509k
Peak memory use after GGC: 8897k
Maximum of released memory in single GGC run: 2602k
Garbage: 38652k -> 38655k
Leak: 6733k
Overhead: 5889k
GGC runs: 303 -> 304
comparing combine.c compilation at -O1 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17430k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2284k
Garbage: 59422k -> 59420k
Leak: 6882k
Overhead: 7046k -> 7046k
GGC runs: 377
comparing combine.c compilation at -O2 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17435k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2387k
Garbage: 83218k -> 83216k
Leak: 6996k
Overhead: 9690k -> 9690k
GGC runs: 442
comparing combine.c compilation at -O3 level:
Overall memory needed: 25992k
Peak memory use before GGC: 18537k
Peak memory use after GGC: 17840k
Maximum of released memory in single GGC run: 3516k
Garbage: 113347k -> 113345k
Leak: 7086k
Overhead: 13186k -> 13186k
GGC runs: 494
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 9885k to 9901k, overall 0.16%
Overall memory needed: 82164k
Peak memory use before GGC: 69036k
Peak memory use after GGC: 44790k
Maximum of released memory in single GGC run: 36009k
Garbage: 140382k -> 140381k
Leak: 9885k -> 9901k
Overhead: 20394k -> 20394k
GGC runs: 239
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 105340k
Peak memory use before GGC: 85347k
Peak memory use after GGC: 79195k
Maximum of released memory in single GGC run: 32286k
Garbage: 283067k -> 283065k
Leak: 10065k
Overhead: 33382k -> 33382k
GGC runs: 239
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 107912k -> 107916k
Peak memory use before GGC: 89760k
Peak memory use after GGC: 81649k
Maximum of released memory in single GGC run: 30736k
Garbage: 330591k -> 330590k
Leak: 10051k
Overhead: 40625k -> 40625k
GGC runs: 264
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 107928k
Peak memory use before GGC: 89786k
Peak memory use after GGC: 81675k
Maximum of released memory in single GGC run: 30934k
Garbage: 331201k -> 331200k
Leak: 10056k
Overhead: 40821k -> 40821k
GGC runs: 268
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118260k
Peak memory use before GGC: 95032k -> 95031k
Peak memory use after GGC: 94083k
Maximum of released memory in single GGC run: 20360k -> 20359k
Garbage: 218496k -> 218411k
Leak: 49513k
Overhead: 37972k -> 37967k
GGC runs: 363
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 115852k -> 115856k
Peak memory use before GGC: 97679k
Peak memory use after GGC: 96699k
Maximum of released memory in single GGC run: 18987k
Garbage: 463624k -> 463615k
Leak: 52800k
Overhead: 51424k -> 51424k
GGC runs: 509
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 115848k
Peak memory use before GGC: 97679k
Peak memory use after GGC: 96700k
Maximum of released memory in single GGC run: 18987k
Garbage: 552446k -> 552437k
Leak: 53701k
Overhead: 60154k -> 60154k
GGC runs: 589
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 117132k
Peak memory use before GGC: 98973k
Peak memory use after GGC: 97993k
Maximum of released memory in single GGC run: 19240k
Garbage: 572423k -> 572416k
Leak: 54058k
Overhead: 61151k -> 61151k
GGC runs: 599
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-04-18 11:24:22.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-04-18 13:03:41.000000000 +0000
@@ -1,3 +1,11 @@
+2006-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * function.c (temp_slots_at_level, max_slot_level): Use VEC
+ instead of VARRAY.
+ * function.h (temp_slot_p): New.
+ (function): Change the type of x_used_temp_slots to
+ VEC(temp_slot_p,gc) *.
+
2006-04-18 Nick Clifton <nickc@redhat.com>
* config/mmix/mmix.h (OPTIMIZATION_OPTIONS): Remove reference to
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.
More information about the Gcc-regression
mailing list