A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Tue Oct 31 14:45: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: 28347k
Peak memory use before GGC: 9282k
Peak memory use after GGC: 8821k
Maximum of released memory in single GGC run: 2666k
Garbage: 36829k
Leak: 6441k
Overhead: 4856k
GGC runs: 280
comparing combine.c compilation at -O1 level:
Overall memory needed: 40195k
Peak memory use before GGC: 17270k
Peak memory use after GGC: 17094k
Maximum of released memory in single GGC run: 2383k
Garbage: 57448k
Leak: 6482k
Overhead: 6196k
GGC runs: 355
comparing combine.c compilation at -O2 level:
Overall memory needed: 29774k -> 29778k
Peak memory use before GGC: 17266k
Peak memory use after GGC: 17094k
Maximum of released memory in single GGC run: 2916k -> 2900k
Garbage: 76563k -> 76340k
Leak: 6578k
Overhead: 8786k -> 8741k
GGC runs: 420
comparing combine.c compilation at -O3 level:
Overall memory needed: 28882k
Peak memory use before GGC: 18206k
Peak memory use after GGC: 17822k
Maximum of released memory in single GGC run: 4105k
Garbage: 106666k -> 106171k
Leak: 6653k
Overhead: 12394k -> 12295k
GGC runs: 471 -> 469
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 88222k
Peak memory use before GGC: 69766k
Peak memory use after GGC: 44176k
Maximum of released memory in single GGC run: 36964k
Garbage: 129071k
Leak: 9486k
Overhead: 16989k
GGC runs: 217
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114146k -> 114150k
Peak memory use before GGC: 90352k
Peak memory use after GGC: 83714k
Maximum of released memory in single GGC run: 31806k
Garbage: 277742k
Leak: 9328k
Overhead: 29771k
GGC runs: 223
comparing insn-attrtab.c compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 111174k to 120258k, overall 8.17%
Overall memory needed: 111174k -> 120258k
Peak memory use before GGC: 92581k
Peak memory use after GGC: 84694k
Maximum of released memory in single GGC run: 30383k -> 30380k
Garbage: 320900k -> 319046k
Leak: 9330k
Overhead: 37085k -> 36713k
GGC runs: 250 -> 247
comparing insn-attrtab.c compilation at -O3 level:
Overall memory allocated via mmap and sbrk increased from 111206k to 129334k, overall 16.30%
Overall memory needed: 111206k -> 129334k
Peak memory use before GGC: 92607k
Peak memory use after GGC: 84719k
Maximum of released memory in single GGC run: 30575k -> 30571k
Garbage: 321528k -> 319694k
Leak: 9333k
Overhead: 37278k -> 36910k
GGC runs: 254 -> 250
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119490k
Peak memory use before GGC: 92635k
Peak memory use after GGC: 91717k
Maximum of released memory in single GGC run: 19299k
Garbage: 205556k
Leak: 47662k
Overhead: 20811k
GGC runs: 402
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119222k
Peak memory use before GGC: 97821k
Peak memory use after GGC: 95611k
Maximum of released memory in single GGC run: 18569k
Garbage: 444259k
Leak: 49995k
Overhead: 32811k
GGC runs: 552
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119218k
Peak memory use before GGC: 97820k
Peak memory use after GGC: 95611k
Maximum of released memory in single GGC run: 18569k
Garbage: 508058k -> 505995k
Leak: 50699k -> 50700k
Overhead: 40860k -> 40452k
GGC runs: 612 -> 609
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 118922k
Peak memory use before GGC: 97868k
Peak memory use after GGC: 96898k
Maximum of released memory in single GGC run: 18831k
Garbage: 527424k -> 525377k
Leak: 50275k -> 50275k
Overhead: 41375k -> 40968k
GGC runs: 626 -> 623
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137934k
Peak memory use before GGC: 81886k
Peak memory use after GGC: 58766k
Maximum of released memory in single GGC run: 45494k
Garbage: 147250k
Leak: 7507k
Overhead: 25296k
GGC runs: 83
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 424386k -> 424294k
Peak memory use before GGC: 205249k
Peak memory use after GGC: 201025k
Maximum of released memory in single GGC run: 101716k
Garbage: 271709k
Leak: 47573k
Overhead: 30825k
GGC runs: 101
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 352226k -> 352134k
Peak memory use before GGC: 206000k
Peak memory use after GGC: 201776k
Maximum of released memory in single GGC run: 108041k
Garbage: 350431k
Leak: 48156k
Overhead: 46270k
GGC runs: 108
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 535282k -> 535278k
Peak memory use before GGC: 314907k
Peak memory use after GGC: 293250k
Maximum of released memory in single GGC run: 163448k
Garbage: 491201k -> 491202k
Leak: 65488k
Overhead: 59087k -> 59087k
GGC runs: 95
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-10-31 01:47:23.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-10-31 13:14:53.000000000 +0000
@@ -1,3 +1,19 @@
+2006-10-31 Richard Guenther <rguenther@suse.de>
+
+ * config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2,
+ acossf2, acosxf2, log1psf2, log1pdf2, log1pxf2, ilogbsi2,
+ expsf2, expdf2, expxf2, exp10sf2, exp10df2, exp10xf2,
+ exp2sf2, exp2df2, exp2xf2, expm1df2, expm1sf2, expm1xf2,
+ ldexpdf3, ldexpsf3, ldexpxf3, rintxf2, rintdf2, rintsf2,
+ lround<mode>di2, lround<mode>si2, floorxf2, floordf2, floorsf2,
+ lfloor<mode>di2, lfloor<mode>si2, ceilxf2, ceildf2, ceilsf2,
+ btruncxf2, btruncdf2, btruncsf2): Conditionalize expansion on
+ !optimize_size.
+
+2006-10-31 Steven Bosscher <steven@gcc.gnu.org>
+
+ * opts.c (decode_options): Disable CSE skip blocks.
+
2006-10-30 Dirk Mueller <dmueller@suse.de>
* c-common.h (strict_aliasing_warning): Fix whitespace.
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