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: Fri, 29 Jun 2007 13:54:01 +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 empty function compilation at -O0 level:
Overall memory needed: 8331k -> 8332k
Peak memory use before GGC: 3323k -> 3324k
Peak memory use after GGC: 2988k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 490k -> 490k
Leak: 3720k -> 3720k
Overhead: 874k -> 874k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 8347k -> 8348k
Peak memory use before GGC: 3351k
Peak memory use after GGC: 3015k -> 3016k
Maximum of released memory in single GGC run: 336k -> 335k
Garbage: 492k -> 492k
Leak: 3752k -> 3753k
Overhead: 878k -> 878k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 8387k -> 8384k
Peak memory use before GGC: 3323k -> 3324k
Peak memory use after GGC: 2988k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 495k -> 495k
Leak: 3722k -> 3723k
Overhead: 874k -> 874k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 8399k -> 8396k
Peak memory use before GGC: 3323k -> 3324k
Peak memory use after GGC: 2988k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 498k -> 498k
Leak: 3722k -> 3723k
Overhead: 875k -> 875k
GGC runs: 3
comparing empty function compilation at -O3 level:
Overall memory needed: 8399k -> 8396k
Peak memory use before GGC: 3323k -> 3324k
Peak memory use after GGC: 2988k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 498k -> 498k
Leak: 3722k -> 3723k
Overhead: 875k -> 875k
GGC runs: 3
comparing combine.c compilation at -O0 level:
Peak amount of GGC memory allocated before garbage collecting increased from 9967k to 9987k, overall 0.20%
Overall memory needed: 23399k -> 23408k
Peak memory use before GGC: 9967k -> 9987k
Peak memory use after GGC: 9189k -> 9190k
Maximum of released memory in single GGC run: 1907k
Garbage: 38260k -> 38258k
Leak: 8337k -> 8338k
Overhead: 5338k -> 5338k
GGC runs: 243
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 25303k -> 25296k
Peak memory use before GGC: 11631k
Peak memory use after GGC: 10975k
Maximum of released memory in single GGC run: 1880k
Garbage: 38640k -> 38624k
Leak: 11230k -> 11231k
Overhead: 6044k -> 6044k
GGC runs: 241
comparing combine.c compilation at -O1 level:
Overall memory needed: 37103k -> 37096k
Peak memory use before GGC: 18608k -> 18609k
Peak memory use after GGC: 18407k
Maximum of released memory in single GGC run: 1379k -> 1380k
Garbage: 51724k -> 51719k
Leak: 8393k -> 8393k
Overhead: 6447k -> 6446k
GGC runs: 317
comparing combine.c compilation at -O2 level:
Overall memory needed: 39023k -> 39016k
Peak memory use before GGC: 18649k -> 18653k
Peak memory use after GGC: 18464k
Maximum of released memory in single GGC run: 1356k -> 1355k
Garbage: 68472k -> 68465k
Leak: 8519k -> 8508k
Overhead: 8578k -> 8578k
GGC runs: 374
comparing combine.c compilation at -O3 level:
Overall memory needed: 44479k -> 44472k
Peak memory use before GGC: 18802k -> 18803k
Peak memory use after GGC: 18599k -> 18600k
Maximum of released memory in single GGC run: 3718k
Garbage: 93717k -> 93723k
Leak: 8623k -> 8631k
Overhead: 11866k -> 11867k
GGC runs: 404
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 143063k -> 143072k
Peak memory use before GGC: 60776k -> 60777k
Peak memory use after GGC: 33782k -> 33783k
Maximum of released memory in single GGC run: 34624k -> 34625k
Garbage: 131970k -> 131975k
Leak: 11182k -> 11182k
Overhead: 14735k -> 14736k
GGC runs: 186
comparing insn-attrtab.c compilation at -O0 -g level:
Amount of produced GGC garbage increased from 132202k to 132456k, overall 0.19%
Overall memory needed: 144335k -> 144332k
Peak memory use before GGC: 61938k -> 61939k
Peak memory use after GGC: 34943k -> 34944k
Maximum of released memory in single GGC run: 34625k -> 34626k
Garbage: 132202k -> 132456k
Leak: 12890k -> 12651k
Overhead: 15133k -> 15133k
GGC runs: 191 -> 192
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 153531k -> 153504k
Peak memory use before GGC: 59006k -> 59007k
Peak memory use after GGC: 54779k -> 54782k
Maximum of released memory in single GGC run: 23623k
Garbage: 215879k -> 215850k
Leak: 11068k -> 11068k
Overhead: 25091k -> 25091k
GGC runs: 217
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 192051k -> 192028k
Peak memory use before GGC: 58885k -> 58886k
Peak memory use after GGC: 54870k -> 54871k
Maximum of released memory in single GGC run: 21314k -> 21313k
Garbage: 248434k -> 248436k
Leak: 11057k -> 11058k
Overhead: 30441k -> 30441k
GGC runs: 240
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 197975k -> 197996k
Peak memory use before GGC: 70104k
Peak memory use after GGC: 65673k
Maximum of released memory in single GGC run: 22921k -> 22922k
Garbage: 277484k -> 277485k
Leak: 11068k -> 11068k
Overhead: 32160k -> 32160k
GGC runs: 242
comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak amount of GGC memory allocated before garbage collecting increased from 89734k to 89846k, overall 0.12%
Peak amount of GGC memory still allocated after garbage collecting increased from 88846k to 88956k, overall 0.12%
Overall memory needed: 154240k -> 154360k
Peak memory use before GGC: 89734k -> 89846k
Peak memory use after GGC: 88846k -> 88956k
Maximum of released memory in single GGC run: 17863k -> 17977k
Garbage: 208375k -> 208357k
Leak: 52513k -> 52514k
Overhead: 24545k -> 24545k
GGC runs: 399 -> 398
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 174640k -> 174644k
Peak memory use before GGC: 102488k -> 102484k
Peak memory use after GGC: 101473k -> 101469k
Maximum of released memory in single GGC run: 18365k -> 18362k
Garbage: 214040k -> 214036k
Leak: 75823k -> 75824k
Overhead: 30441k -> 30441k
GGC runs: 374 -> 373
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 150465k -> 150440k
Peak memory use before GGC: 101411k -> 101405k
Peak memory use after GGC: 100405k -> 100400k
Maximum of released memory in single GGC run: 17436k -> 17434k
Garbage: 339512k -> 339494k
Leak: 53496k -> 53497k
Overhead: 31404k -> 31403k
GGC runs: 514
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 158061k -> 158056k
Peak memory use before GGC: 101783k -> 101777k
Peak memory use after GGC: 100770k -> 100765k
Maximum of released memory in single GGC run: 17436k -> 17434k
Garbage: 388732k -> 388855k
Leak: 53814k -> 53816k
Overhead: 37114k -> 37142k
GGC runs: 563
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 160529k -> 160576k
Peak memory use before GGC: 103425k -> 103423k
Peak memory use after GGC: 102385k -> 102384k
Maximum of released memory in single GGC run: 17798k -> 17796k
Garbage: 422394k -> 422644k
Leak: 54530k -> 54530k
Overhead: 39732k -> 39729k
GGC runs: 588 -> 586
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 387577k -> 387572k
Peak memory use before GGC: 103386k -> 103387k
Peak memory use after GGC: 59040k -> 59041k
Maximum of released memory in single GGC run: 50582k
Garbage: 179453k -> 179405k
Leak: 8877k -> 8877k
Overhead: 31379k -> 31379k
GGC runs: 64
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 388381k -> 388388k
Peak memory use before GGC: 104033k
Peak memory use after GGC: 59686k -> 59687k
Maximum of released memory in single GGC run: 50583k -> 50582k
Garbage: 179509k -> 179510k
Leak: 10645k -> 10645k
Overhead: 31875k -> 31875k
GGC runs: 72
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 311611k -> 311696k
Peak memory use before GGC: 84352k -> 84351k
Peak memory use after GGC: 75887k -> 75888k
Maximum of released memory in single GGC run: 39403k -> 39401k
Garbage: 232481k -> 232479k
Leak: 22312k -> 22313k
Overhead: 32107k -> 32107k
GGC runs: 71
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 320123k -> 320016k
Peak memory use before GGC: 80873k -> 80874k
Peak memory use after GGC: 75887k -> 75888k
Maximum of released memory in single GGC run: 33014k -> 33013k
Garbage: 240662k -> 240662k
Leak: 22392k -> 22392k
Overhead: 34406k -> 34406k
GGC runs: 83
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1032495k -> 1032492k
Peak memory use before GGC: 184627k -> 184628k
Peak memory use after GGC: 172143k -> 172144k
Maximum of released memory in single GGC run: 80995k
Garbage: 349089k -> 349089k
Leak: 47770k -> 47771k
Overhead: 45251k -> 45251k
GGC runs: 66
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-06-28 19:38:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-06-29 11:48:11.000000000 +0000
@@ -1,3 +1,37 @@
+2007-06-29 Jan Hubicka <jh@suse.cz>
+
+ * recog.c (validate_change_rtx_1): Unshare TO argument.
+
+2007-06-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/24659
+ * tree-vect-transform.c (vectorizable_call): Handle
+ (nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.
+
+ * config/i386/sse.md (vec_pack_sfix_v2df): New expander.
+ * config/i386/i386.c (enum ix86_builtins)
+ [IX86_BUILTIN_VEC_PACK_SFIX]: New constant.
+ (struct bdesc_2arg) [__builtin_ia32_vec_pack_sfix]: New builtin
+ description.
+ (ix86_init_mmx_sse_builtins): Define all builtins with 2 arguments as
+ const using def_builtin_const.
+ (ix86_expand_binop_builtin): Remove bogus assert() that insn wants
+ input operands in the same modes as the result.
+ (ix86_builtin_vectorized_function): Handle BUILT_IN_LRINT.
+
+2007-06-29 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * df-problems.c (df_set_unused_notes_for_mw): Fix formatting.
+ (df_set_dead_notes_for_mw): Likewise.
+
+2007-06-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * c-common.c (pointer_int_sum): Do the negation in sizetype.
+
+2007-06-28 DJ Delorie <dj@redhat.com>
+
+ * config/m32c/m32c.h (OVERRIDE_OPTIONS): Omit unneeded semicolon.
+
2007-06-28 Geoffrey Keating <geoffk@apple.com>
* doc/invoke.texi (C++ Dialect Options): Document
@@ -251,7 +285,7 @@
* gimplify.c (mark_addressable): New function.
(gimplify_modify_expr_rhs, gimplify_addr_expr, gimplify_expr): Use it.
-2007-06-19 Uros Bizjak <ubizjak@gmail.com>
+2007-06-22 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/32374
* expr.c (store_constructor): Do not clobber non-zeroed memory.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-06-28 19:38:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-06-29 11:48:10.000000000 +0000
@@ -7,7 +7,7 @@
2007-06-28 Geoffrey Keating <geoffk@apple.com>
- * decl2.c (start_objects): Mark constructor-runnning function
+ * decl2.c (start_objects): Mark constructor-running function
as artificial.
2007-06-26 Simon Martin <simartin@users.sourceforge.net>
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.