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: Sun, 24 Jun 2007 04:46:41 +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: 7499k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 490k
Leak: 2282k
Overhead: 404k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7515k
Peak memory use before GGC: 2382k
Peak memory use after GGC: 2047k
Maximum of released memory in single GGC run: 335k
Garbage: 492k
Leak: 2315k
Overhead: 409k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7551k
Peak memory use before GGC: 2354k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 335k
Garbage: 495k
Leak: 2284k
Overhead: 405k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7567k
Peak memory use before GGC: 2355k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 336k
Garbage: 498k
Leak: 2284k
Overhead: 406k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7567k
Peak memory use before GGC: 2355k
Peak memory use after GGC: 2019k
Maximum of released memory in single GGC run: 336k
Garbage: 498k
Leak: 2284k
Overhead: 406k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 22423k
Peak memory use before GGC: 9019k
Peak memory use after GGC: 8221k
Maximum of released memory in single GGC run: 1584k
Garbage: 38291k
Leak: 6892k
Overhead: 4869k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24351k
Peak memory use before GGC: 10755k
Peak memory use after GGC: 10006k
Maximum of released memory in single GGC run: 1879k
Garbage: 38623k
Leak: 9785k
Overhead: 5574k
GGC runs: 272
comparing combine.c compilation at -O1 level:
Overall memory needed: 35103k -> 35091k
Peak memory use before GGC: 17670k
Peak memory use after GGC: 17481k
Maximum of released memory in single GGC run: 1346k
Garbage: 51740k
Leak: 6955k
Overhead: 5979k
GGC runs: 358
comparing combine.c compilation at -O2 level:
Overall memory needed: 37023k
Peak memory use before GGC: 17690k
Peak memory use after GGC: 17495k
Maximum of released memory in single GGC run: 1348k
Garbage: 68453k -> 68454k
Leak: 7069k
Overhead: 8105k -> 8105k
GGC runs: 423
comparing combine.c compilation at -O3 level:
Overall memory needed: 43475k -> 43479k
Peak memory use before GGC: 17891k
Peak memory use after GGC: 17634k
Maximum of released memory in single GGC run: 3637k
Garbage: 93745k -> 93745k
Leak: 7185k
Overhead: 11397k -> 11397k
GGC runs: 449
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 142087k
Peak memory use before GGC: 59808k
Peak memory use after GGC: 32814k
Maximum of released memory in single GGC run: 34625k
Garbage: 131974k
Leak: 9744k
Overhead: 14266k
GGC runs: 219
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 143327k -> 143331k
Peak memory use before GGC: 60970k
Peak memory use after GGC: 33975k
Maximum of released memory in single GGC run: 34626k
Garbage: 132465k
Leak: 11212k
Overhead: 14664k
GGC runs: 218
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 153367k -> 153347k
Peak memory use before GGC: 58038k
Peak memory use after GGC: 53813k
Maximum of released memory in single GGC run: 23623k
Garbage: 215877k
Leak: 9630k
Overhead: 24621k
GGC runs: 247
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 191015k -> 193179k
Peak memory use before GGC: 57917k
Peak memory use after GGC: 53902k
Maximum of released memory in single GGC run: 21313k
Garbage: 248439k -> 248440k
Leak: 9620k
Overhead: 29973k -> 29973k
GGC runs: 271
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 196935k -> 196963k
Peak memory use before GGC: 69164k
Peak memory use after GGC: 64704k
Maximum of released memory in single GGC run: 22922k
Garbage: 277525k -> 277526k
Leak: 9630k
Overhead: 31698k -> 31698k
GGC runs: 274
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 153475k -> 153453k
Peak memory use before GGC: 88872k
Peak memory use after GGC: 87992k
Maximum of released memory in single GGC run: 17970k
Garbage: 208365k
Leak: 51076k
Overhead: 24076k
GGC runs: 410
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 173923k -> 173921k
Peak memory use before GGC: 101492k
Peak memory use after GGC: 100487k
Maximum of released memory in single GGC run: 18337k
Garbage: 214057k
Leak: 74385k
Overhead: 29972k
GGC runs: 381
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 52053k to 52214k, overall 0.31%
Overall memory needed: 149243k -> 149743k
Peak memory use before GGC: 100425k -> 100334k
Peak memory use after GGC: 99431k -> 99339k
Maximum of released memory in single GGC run: 17358k
Garbage: 339539k -> 336358k
Leak: 52053k -> 52214k
Overhead: 30903k -> 30953k
GGC runs: 527 -> 526
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 52359k to 52933k, overall 1.10%
Overall memory needed: 156775k -> 158627k
Peak memory use before GGC: 100809k -> 100724k
Peak memory use after GGC: 99808k -> 99723k
Maximum of released memory in single GGC run: 17358k
Garbage: 388392k -> 384157k
Leak: 52359k -> 52933k
Overhead: 36593k -> 36579k
GGC runs: 577 -> 578
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 52971k to 53185k, overall 0.40%
Overall memory needed: 159239k -> 159991k
Peak memory use before GGC: 102816k -> 102751k
Peak memory use after GGC: 101797k -> 101724k
Maximum of released memory in single GGC run: 17782k
Garbage: 422215k -> 416336k
Leak: 52971k -> 53185k
Overhead: 39247k -> 39163k
GGC runs: 601 -> 598
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 386599k
Peak memory use before GGC: 102418k
Peak memory use after GGC: 58071k
Maximum of released memory in single GGC run: 50583k
Garbage: 179454k
Leak: 7439k
Overhead: 30910k
GGC runs: 76
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 387403k -> 387399k
Peak memory use before GGC: 103064k
Peak memory use after GGC: 58718k
Maximum of released memory in single GGC run: 50582k
Garbage: 179559k
Leak: 9207k
Overhead: 31406k
GGC runs: 84
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 306531k -> 306539k
Peak memory use before GGC: 83384k
Peak memory use after GGC: 74918k
Maximum of released memory in single GGC run: 39404k
Garbage: 232481k
Leak: 20874k
Overhead: 31637k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 319271k -> 319095k
Peak memory use before GGC: 79904k
Peak memory use after GGC: 74918k
Maximum of released memory in single GGC run: 33013k
Garbage: 240335k
Leak: 20954k
Overhead: 33872k
GGC runs: 92
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1031395k -> 1031475k
Peak memory use before GGC: 183658k
Peak memory use after GGC: 171174k
Maximum of released memory in single GGC run: 80733k
Garbage: 348761k
Leak: 46332k
Overhead: 44716k
GGC runs: 75
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-06-23 10:33:42.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-06-24 02:40:53.000000000 +0000
@@ -1,3 +1,63 @@
+2007-06-23 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/extend.texi: Document that dllimport and dllexport imply
+ default visibility.
+ * tree.c (handle_dll_attribute): Set DECL_VISIBILITY on the
+ imported or exported declaration, including type declarations.
+ * c-common.c (handle_visibility_attribute): Check for conflicts
+ with dllimport/dllexport.
+ (c_determine_visibility): Handle dllimport/dllexport as an
+ explicit visibility atttribute.
+
+2007-06-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/16876
+ PR middle-end/29478
+ * tree.h (CALL_CANNOT_INLINE_P): New macro to access static_flag
+ for CALL_EXPRs.
+ * tree-inline.c (initialize_inlined_parameters): Do not call
+ lang_hooks.tree_inlining.convert_parm_for_inlining.
+ * cgraphbuild.c (initialize_inline_failed): Set inline failed
+ reason for mismatched types.
+ * gimplify.c (gimplify_call_expr): Verify the call expression
+ arguments match the called function type signature. Otherwise
+ mark the call expression to be not considered for inlining
+ using CALL_CANNOT_INLINE_P flag.
+ * ipa-inline.c (cgraph_mark_inline): Honor CALL_CANNOT_INLINE_P on the
+ edges call expression.
+ (cgraph_decide_inlining_of_small_function): Likewise.
+ (cgraph_decide_inlining): Likewise.
+ * c-objc-common.h (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
+ Remove define.
+ * c-tree.h (c_convert_parm_for_inlining): Remove declaration.
+ * c-typeck.c (c_convert_parm_for_inlining): Remove.
+ * langhooks-def.h (lhd_tree_inlining_convert_parm_for_inlining):
+ Remove declaration.
+ (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Remove define.
+ * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining):
+ Remove.
+ * langhooks.h (struct lang_hooks_for_tree_inlining): Remove
+ convert_parm_for_inlining member.
+
+2007-06-23 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/31152
+ * arm.md (negscc): Match the correct operand for optimized LT0 test.
+ Remove optimization for GT.
+
+2007-06-23 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/32437
+ *dce.c (deletable_insn_p): Add extra parameter and recurse if insn
+ is a PARALLEL.
+ (prescan_insns_for_dce): Add extra parameter.
+
+2007-06-23 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/31541
+ * 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>
PR middle-end/32374
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-06-19 09:16:24.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-06-24 02:40:52.000000000 +0000
@@ -1,3 +1,8 @@
+2007-06-23 Mark Mitchell <mark@codesourcery.com>
+
+ * decl2.c (determine_visibility): Don't look for dllexport here.
+ (determine_visibility_from_class): Tidy.
+
2007-06-18 Simon Baldwin <simonb@google.com>
PR c++/31923
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.