This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased GCC's memory consumption!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Tue, 30 Aug 2005 03:54:42 +0000
- Subject: 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: 24841k
Peak memory use before GGC: 9590k
Peak memory use after GGC: 8937k
Maximum of released memory in single GGC run: 2737k
Garbage: 40070k
Leak: 6698k
Overhead: 5787k
GGC runs: 316
comparing combine.c compilation at -O1 level:
Overall memory needed: 26812k
Peak memory use before GGC: 17359k
Peak memory use after GGC: 17173k
Maximum of released memory in single GGC run: 2373k
Garbage: 60344k
Leak: 7084k
Overhead: 7591k
GGC runs: 385
comparing combine.c compilation at -O2 level:
Overall memory needed: 26812k
Peak memory use before GGC: 17361k
Peak memory use after GGC: 17173k
Maximum of released memory in single GGC run: 2456k
Garbage: 77890k
Leak: 7476k
Overhead: 10123k
GGC runs: 456
comparing combine.c compilation at -O3 level:
Overall memory needed: 26812k
Peak memory use before GGC: 18479k
Peak memory use after GGC: 18109k
Maximum of released memory in single GGC run: 3367k
Garbage: 111044k
Leak: 7548k
Overhead: 13950k
GGC runs: 515
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80920k
Peak memory use before GGC: 69464k
Peak memory use after GGC: 45002k
Maximum of released memory in single GGC run: 36248k
Garbage: 146330k
Leak: 10091k
Overhead: 19790k
GGC runs: 250
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 112284k
Peak memory use before GGC: 94162k
Peak memory use after GGC: 83709k
Maximum of released memory in single GGC run: 32587k
Garbage: 290093k
Leak: 10077k
Overhead: 36723k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 126408k
Peak memory use before GGC: 113395k
Peak memory use after GGC: 83671k
Maximum of released memory in single GGC run: 32273k
Garbage: 376144k
Leak: 10190k
Overhead: 48541k
GGC runs: 273
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 126456k
Peak memory use before GGC: 113417k
Peak memory use after GGC: 83695k
Maximum of released memory in single GGC run: 32593k
Garbage: 376704k
Leak: 10208k
Overhead: 48692k
GGC runs: 275
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118612k
Peak memory use before GGC: 95329k
Peak memory use after GGC: 94374k
Maximum of released memory in single GGC run: 20170k
Garbage: 226745k
Leak: 49361k
Overhead: 36904k
GGC runs: 343
comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting increased from 94382k to 95934k, overall 1.64%
Overall memory needed: 105688k -> 105988k
Peak memory use before GGC: 94382k -> 95934k
Peak memory use after GGC: 93445k
Maximum of released memory in single GGC run: 19453k -> 20638k
Garbage: 576028k -> 576046k
Leak: 55656k -> 55657k
Overhead: 68545k -> 68544k
GGC runs: 497 -> 494
comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 94382k to 95934k, overall 1.64%
Overall memory needed: 106204k -> 106936k
Peak memory use before GGC: 94382k -> 95934k
Peak memory use after GGC: 93446k
Maximum of released memory in single GGC run: 19453k -> 20638k
Garbage: 662699k -> 662684k
Leak: 56486k -> 56487k
Overhead: 80314k -> 80312k
GGC runs: 558 -> 557
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 95467k to 97416k, overall 2.04%
Overall memory needed: 109696k -> 110232k
Peak memory use before GGC: 95467k -> 97416k
Peak memory use after GGC: 94521k
Maximum of released memory in single GGC run: 19611k -> 21144k
Garbage: 717203k -> 717126k
Leak: 57458k
Overhead: 85177k -> 85177k
GGC runs: 566 -> 564
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-08-29 15:05:49.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-08-30 02:44:48.000000000 +0000
@@ -1,3 +1,9 @@
+2005-08-18 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/23408
+ * ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the
+ call to ggc_collect.
+
2005-08-18 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/21268
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.