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, 12 Oct 2007 17:25:22 +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: 7041k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1079k
Maximum of released memory in single GGC run: 126k
Garbage: 249k
Leak: 1084k
Overhead: 141k
GGC runs: 4
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7057k
Peak memory use before GGC: 1207k
Peak memory use after GGC: 1107k
Maximum of released memory in single GGC run: 128k
Garbage: 252k
Leak: 1116k
Overhead: 145k
GGC runs: 4
comparing empty function compilation at -O1 level:
Overall memory needed: 7097k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1071k
Maximum of released memory in single GGC run: 121k
Garbage: 251k
Leak: 1084k
Overhead: 141k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7101k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1072k
Maximum of released memory in single GGC run: 121k
Garbage: 255k
Leak: 1085k
Overhead: 142k
GGC runs: 3
comparing empty function compilation at -O3 level:
Overall memory needed: 7101k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1072k
Maximum of released memory in single GGC run: 121k
Garbage: 255k
Leak: 1085k
Overhead: 142k
GGC runs: 3
comparing combine.c compilation at -O0 level:
Overall memory needed: 22037k
Peak memory use before GGC: 8285k
Peak memory use after GGC: 7624k
Maximum of released memory in single GGC run: 1580k
Garbage: 38815k
Leak: 6168k
Overhead: 5023k
GGC runs: 369
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24049k
Peak memory use before GGC: 10115k
Peak memory use after GGC: 9393k
Maximum of released memory in single GGC run: 1875k
Garbage: 39157k
Leak: 9002k
Overhead: 5695k
GGC runs: 342
comparing combine.c compilation at -O1 level:
Overall memory needed: 33117k -> 33129k
Peak memory use before GGC: 17064k -> 17062k
Peak memory use after GGC: 16877k -> 16876k
Maximum of released memory in single GGC run: 1379k -> 1378k
Garbage: 52446k -> 52356k
Leak: 6321k -> 6320k
Overhead: 6007k -> 6001k
GGC runs: 440
comparing combine.c compilation at -O2 level:
Overall memory needed: 35377k -> 35373k
Peak memory use before GGC: 17135k -> 17140k
Peak memory use after GGC: 16965k -> 16964k
Maximum of released memory in single GGC run: 1335k
Garbage: 71359k -> 71263k
Leak: 6652k -> 6652k
Overhead: 8260k -> 8251k
GGC runs: 508 -> 507
comparing combine.c compilation at -O3 level:
Overall memory needed: 38813k -> 38809k
Peak memory use before GGC: 17346k -> 17338k
Peak memory use after GGC: 17019k -> 17017k
Maximum of released memory in single GGC run: 2131k -> 2129k
Garbage: 92752k -> 92643k
Leak: 6770k -> 6762k
Overhead: 10765k -> 10758k
GGC runs: 538 -> 535
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 138157k -> 138153k
Peak memory use before GGC: 58644k
Peak memory use after GGC: 32137k
Maximum of released memory in single GGC run: 34144k
Garbage: 131597k
Leak: 8915k
Overhead: 14833k
GGC runs: 295
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 139409k
Peak memory use before GGC: 59793k
Peak memory use after GGC: 33286k
Maximum of released memory in single GGC run: 34144k
Garbage: 132073k
Leak: 10351k
Overhead: 15214k
GGC runs: 291
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 146177k -> 144669k
Peak memory use before GGC: 57141k
Peak memory use after GGC: 50911k
Maximum of released memory in single GGC run: 24232k
Garbage: 212493k -> 210298k
Leak: 9807k
Overhead: 24838k -> 24595k
GGC runs: 319 -> 317
comparing insn-attrtab.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 57776k to 57886k, overall 0.19%
Overall memory needed: 186945k -> 186893k
Peak memory use before GGC: 57776k -> 57886k
Peak memory use after GGC: 52504k
Maximum of released memory in single GGC run: 22973k
Garbage: 253959k -> 251765k
Leak: 10895k
Overhead: 30584k -> 30341k
GGC runs: 350 -> 347
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 194069k -> 193001k
Peak memory use before GGC: 69775k -> 69528k
Peak memory use after GGC: 63208k
Maximum of released memory in single GGC run: 23493k
Garbage: 282006k -> 279814k
Leak: 10931k
Overhead: 32463k -> 32220k
GGC runs: 356 -> 351
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 155507k
Peak memory use before GGC: 89791k
Peak memory use after GGC: 88898k
Maximum of released memory in single GGC run: 18065k
Garbage: 210253k
Leak: 53116k
Overhead: 26499k
GGC runs: 418
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 174655k
Peak memory use before GGC: 101236k
Peak memory use after GGC: 100233k
Maximum of released memory in single GGC run: 18252k
Garbage: 215845k
Leak: 74940k
Overhead: 31908k
GGC runs: 392
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121331k -> 121310k
Peak memory use before GGC: 88659k -> 88658k
Peak memory use after GGC: 87777k
Maximum of released memory in single GGC run: 17321k -> 17320k
Garbage: 292929k -> 292180k
Leak: 52381k -> 52380k
Overhead: 30263k -> 30206k
GGC runs: 512 -> 511
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 126339k -> 126426k
Peak memory use before GGC: 88759k -> 88758k
Peak memory use after GGC: 87878k
Maximum of released memory in single GGC run: 17318k -> 17317k
Garbage: 359411k -> 358800k
Leak: 53383k -> 53384k
Overhead: 37235k -> 37185k
GGC runs: 592
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 130763k -> 131206k
Peak memory use before GGC: 89976k -> 89975k
Peak memory use after GGC: 89081k
Maximum of released memory in single GGC run: 17674k -> 17673k
Garbage: 391621k -> 391335k
Leak: 53812k -> 53806k
Overhead: 39963k -> 39984k
GGC runs: 613
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 379340k -> 379339k
Peak memory use before GGC: 101510k
Peak memory use after GGC: 57163k
Maximum of released memory in single GGC run: 50582k
Garbage: 179454k
Leak: 6299k
Overhead: 30876k
GGC runs: 105
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 380144k -> 380143k
Peak memory use before GGC: 102144k
Peak memory use after GGC: 57797k
Maximum of released memory in single GGC run: 50583k
Garbage: 179559k
Leak: 8007k
Overhead: 31342k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 395937k -> 390977k
Peak memory use before GGC: 81062k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 40265k
Garbage: 237341k
Leak: 16597k
Overhead: 34424k
GGC runs: 103
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 298721k -> 298809k
Peak memory use before GGC: 78187k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 33868k
Garbage: 247405k
Leak: 16685k
Overhead: 37428k
GGC runs: 116
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1312617k -> 1312325k
Peak memory use before GGC: 136332k
Peak memory use after GGC: 126665k
Maximum of released memory in single GGC run: 68197k
Garbage: 364426k -> 364372k
Leak: 26574k
Overhead: 46311k
GGC runs: 102
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-10-11 20:19:14.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-10-12 13:55:02.000000000 +0000
@@ -1,6 +1,51 @@
+2007-10-12 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/26198
+ * tree-ssa-forwprop.c (can_propagate_from): Do not propagate from
+ a rhs with side-effects or which is a load.
+ (forward_propagate_into_cond): Also try combining both operands.
+
+2007-10-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/33742
+ * tree-vect-transform.c (vectorizable_operation): Return false
+ if get_vectype_for_scalar_type for scalar_dest can't be determined.
+ (vectorizable_call): Same for rhs_type and lhs_type.
+
+2007-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/33645
+ * tree-ssa-live.c (mark_all_vars_used): Add data argument,
+ pass it to walk_tree.
+ (mark_all_vars_used_1): Pass data through to mark_all_vars_used.
+ When calling set_is_used on a VAR_DECL, if data is not NULL and
+ its DECL_UID is in the bitmap, call mark_all_vars_used on its
+ DECL_INITIAL after clearing the bit in bitmap.
+ (remove_unused_locals): Adjust mark_all_vars_used callers.
+ Instead of removing unused global vars from unexpanded_var_list
+ immediately record them in bitmap, call mark_all_vars_used on
+ all used global vars from unexpanded_var_list and only purge
+ global vars that weren't found used even during that step.
+
+2007-10-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gthr-posix.h (__gthread_active_init): Create detached instead of
+ joinable thread when testing whether threads are active on hppa-hpux.
+ * gthr-posix95.h (__gthread_active_init): Likewise.
+
+2007-10-11 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/33676
+ * global.c (build_insn_chain): Include insn that occur between
+ basic blocks.
+
+2007-10-11 Tom Tromey <tromey@redhat.com>
+
+ * gengtype-yacc.y: Delete.
+
2007-10-11 Uros Bizjak <ubizjak@gmail.com>
- * config/i386/i386.md (AX_REG, BX_REG, CX_REG): New constants.
+ * config/i386/i386.md (AX_REG, DX_REG, CX_REG): New constants.
* config/i386/i386.c (ix86_function_arg_regno_p, function_arg_32,
function_value_32, function_value_64, function_value_ms_64,
setup_incoming_varargs_64, ix86_expand_prologue, ix86_expand_call,
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-10-11 20:19:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-10-12 13:55:01.000000000 +0000
@@ -1,3 +1,15 @@
+2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+ * pt.c (tsubst): Use template_parm_level_and_index.
+
+2007-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/32121
+ * parser.c (cp_parser_compound_statement): Handle label-declarations
+ at the beginning of the compound statement.
+ (cp_parser_block_declaration): Issue diagnostics about __label__
+ not at the beginning of a block.
+
2007-10-11 Paolo Carlini <pcarlini@suse.de>
PR c++/33461
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.