A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Sat May 12 21:23:00 GMT 2007
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 empty function compilation at -O0 level:
Overall memory needed: 7412k
Peak memory use before GGC: 2328k
Peak memory use after GGC: 2001k
Maximum of released memory in single GGC run: 327k
Garbage: 480k
Leak: 2378k
Overhead: 517k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7428k
Peak memory use before GGC: 2356k
Peak memory use after GGC: 2028k
Maximum of released memory in single GGC run: 328k
Garbage: 482k
Leak: 2410k
Overhead: 521k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7516k
Peak memory use before GGC: 2328k
Peak memory use after GGC: 2001k
Maximum of released memory in single GGC run: 327k
Garbage: 485k
Leak: 2380k
Overhead: 517k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7524k
Peak memory use before GGC: 2329k
Peak memory use after GGC: 2001k
Maximum of released memory in single GGC run: 328k
Garbage: 489k
Leak: 2380k
Overhead: 518k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7524k
Peak memory use before GGC: 2329k
Peak memory use after GGC: 2001k
Maximum of released memory in single GGC run: 328k
Garbage: 489k
Leak: 2380k
Overhead: 518k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 17672k
Peak memory use before GGC: 9019k
Peak memory use after GGC: 8259k
Maximum of released memory in single GGC run: 1874k
Garbage: 37665k
Leak: 7003k
Overhead: 4751k
GGC runs: 278
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 19576k
Peak memory use before GGC: 10754k
Peak memory use after GGC: 9978k
Maximum of released memory in single GGC run: 1558k
Garbage: 38031k
Leak: 9888k
Overhead: 5457k
GGC runs: 269
comparing combine.c compilation at -O1 level:
Overall memory needed: 30004k
Peak memory use before GGC: 17848k -> 17853k
Peak memory use after GGC: 17654k -> 17655k
Maximum of released memory in single GGC run: 1450k
Garbage: 52519k -> 52529k
Leak: 7055k -> 7056k
Overhead: 5908k
GGC runs: 357
comparing combine.c compilation at -O2 level:
Overall memory needed: 34372k -> 34368k
Peak memory use before GGC: 17877k -> 17878k
Peak memory use after GGC: 17670k -> 17671k
Maximum of released memory in single GGC run: 1392k
Garbage: 69088k -> 69072k
Leak: 7175k -> 7175k
Overhead: 7993k -> 7995k
GGC runs: 413
comparing combine.c compilation at -O3 level:
Overall memory needed: 40688k -> 40696k
Peak memory use before GGC: 18149k -> 18150k
Peak memory use after GGC: 17825k -> 17826k
Maximum of released memory in single GGC run: 3637k
Garbage: 94361k -> 94346k
Leak: 7275k -> 7275k
Overhead: 11260k -> 11267k
GGC runs: 443
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 92860k
Peak memory use before GGC: 58839k
Peak memory use after GGC: 33335k
Maximum of released memory in single GGC run: 33674k
Garbage: 129129k
Leak: 9840k
Overhead: 13888k
GGC runs: 216
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 94140k
Peak memory use before GGC: 60001k
Peak memory use after GGC: 34496k
Maximum of released memory in single GGC run: 33675k
Garbage: 129348k
Leak: 11548k
Overhead: 14285k
GGC runs: 212
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 110296k
Peak memory use before GGC: 63396k
Peak memory use after GGC: 60770k
Maximum of released memory in single GGC run: 24882k
Garbage: 233061k
Leak: 9735k
Overhead: 26099k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 169400k -> 169404k
Peak memory use before GGC: 63531k
Peak memory use after GGC: 61068k
Maximum of released memory in single GGC run: 21237k
Garbage: 269074k -> 269077k
Leak: 9728k
Overhead: 31674k -> 31675k
GGC runs: 266
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 184588k -> 185132k
Peak memory use before GGC: 75553k
Peak memory use after GGC: 71473k
Maximum of released memory in single GGC run: 21970k
Garbage: 300279k -> 300283k
Leak: 9732k
Overhead: 32921k -> 32922k
GGC runs: 267
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 145857k
Peak memory use before GGC: 89184k
Peak memory use after GGC: 88301k
Maximum of released memory in single GGC run: 18130k
Garbage: 206731k
Leak: 51180k
Overhead: 23432k
GGC runs: 408
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 163565k -> 163569k
Peak memory use before GGC: 101740k
Peak memory use after GGC: 100733k
Maximum of released memory in single GGC run: 18433k
Garbage: 212416k
Leak: 74495k
Overhead: 29328k
GGC runs: 381
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 342070k to 342599k, overall 0.15%
Overall memory needed: 141604k -> 141752k
Peak memory use before GGC: 100521k -> 100613k
Peak memory use after GGC: 99509k -> 99601k
Maximum of released memory in single GGC run: 17480k -> 17471k
Garbage: 342070k -> 342599k
Leak: 51770k -> 51773k
Overhead: 30469k -> 30524k
GGC runs: 526
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 388860k to 389969k, overall 0.29%
Overall memory needed: 147908k -> 147228k
Peak memory use before GGC: 101311k -> 101403k
Peak memory use after GGC: 100306k -> 100397k
Maximum of released memory in single GGC run: 17477k -> 17468k
Garbage: 388860k -> 389969k
Leak: 52848k -> 52888k
Overhead: 35884k -> 35993k
GGC runs: 577 -> 579
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 421808k to 423922k, overall 0.50%
Overall memory needed: 149100k -> 149504k
Peak memory use before GGC: 102909k -> 102996k
Peak memory use after GGC: 101888k -> 101975k
Maximum of released memory in single GGC run: 17912k
Garbage: 421808k -> 423922k
Leak: 53150k -> 53197k
Overhead: 38432k -> 38604k
GGC runs: 599 -> 603
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 244576k
Peak memory use before GGC: 81022k
Peak memory use after GGC: 58761k
Maximum of released memory in single GGC run: 44134k
Garbage: 144429k
Leak: 7727k
Overhead: 23300k
GGC runs: 79
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 245396k
Peak memory use before GGC: 81668k
Peak memory use after GGC: 59407k
Maximum of released memory in single GGC run: 44123k
Garbage: 144474k
Leak: 9496k
Overhead: 23796k
GGC runs: 87
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 244000k
Peak memory use before GGC: 83517k
Peak memory use after GGC: 74903k
Maximum of released memory in single GGC run: 39415k
Garbage: 222967k
Leak: 20971k
Overhead: 29139k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 264200k -> 263760k
Peak memory use before GGC: 79889k
Peak memory use after GGC: 74903k
Maximum of released memory in single GGC run: 33022k
Garbage: 229691k -> 229691k
Leak: 21061k
Overhead: 31163k -> 31163k
GGC runs: 91
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1297736k
Peak memory use before GGC: 190662k
Peak memory use after GGC: 178178k
Maximum of released memory in single GGC run: 80665k -> 80664k
Garbage: 362948k -> 362947k
Leak: 46428k
Overhead: 43819k -> 43819k
GGC runs: 72
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-05-12 00:46:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-05-12 19:22:10.000000000 +0000
@@ -1,3 +1,35 @@
+2007-05-12 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcse.c (gcse_main): Do jump bypassing in CPROP2.
+ * passes.c (init_optimization_passes): Move pass_jump_bypass
+ after loop2.
+
+ * basic-block.h (bb_has_eh_pred): Fix style issue.
+
+2007-05-12 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR rtl-optimization/31848
+ * loop-invariant.c (move_invariant_reg): If we move an insn
+ with a REG_EQUAL note, and that insn is not always executed,
+ remove the REG_EQUAL note.
+
+2007-05-12 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/31797
+ * tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not
+ propagate into a stmt that has volatile ops.
+
+2007-05-12 Richard Sandiford <richard@codesourcery.com>
+
+ * configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
+ (gcc_tooldir): Likewise.
+ * configure: Regenerate.
+ * Makefile.in (libsubdir_to_prefix): New variable, based on the
+ old configure.ac gcc_tooldir setting.
+ (prefix_to_exec_prefix): New variable.
+ (DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
+ rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.
+
2007-05-11 Silvius Rus <rus@google.com>
* Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.
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