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, 11 Mar 2007 09:16: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: 7383k
Peak memory use before GGC: 2260k
Peak memory use after GGC: 1949k
Maximum of released memory in single GGC run: 311k
Garbage: 446k
Leak: 2283k
Overhead: 456k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7399k
Peak memory use before GGC: 2288k
Peak memory use after GGC: 1977k
Maximum of released memory in single GGC run: 311k
Garbage: 449k
Leak: 2316k
Overhead: 461k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7511k
Peak memory use before GGC: 2260k
Peak memory use after GGC: 1949k
Maximum of released memory in single GGC run: 311k
Garbage: 452k
Leak: 2286k
Overhead: 457k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 7579k
Peak memory use before GGC: 2261k
Peak memory use after GGC: 1950k
Maximum of released memory in single GGC run: 311k
Garbage: 455k
Leak: 2286k
Overhead: 457k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7579k
Peak memory use before GGC: 2261k
Peak memory use after GGC: 1950k
Maximum of released memory in single GGC run: 311k
Garbage: 455k
Leak: 2286k
Overhead: 457k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 17839k -> 17835k
Peak memory use before GGC: 9262k
Peak memory use after GGC: 8849k
Maximum of released memory in single GGC run: 2578k
Garbage: 36909k
Leak: 6578k
Overhead: 5037k
GGC runs: 279
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 19855k
Peak memory use before GGC: 10878k
Peak memory use after GGC: 10509k
Maximum of released memory in single GGC run: 2354k
Garbage: 37491k
Leak: 9471k
Overhead: 5743k
GGC runs: 268
comparing combine.c compilation at -O1 level:
Overall memory needed: 35255k -> 35263k
Peak memory use before GGC: 19340k
Peak memory use after GGC: 19125k
Maximum of released memory in single GGC run: 2172k
Garbage: 56722k
Leak: 6607k
Overhead: 6304k
GGC runs: 352
comparing combine.c compilation at -O2 level:
Overall memory needed: 37575k
Peak memory use before GGC: 19371k
Peak memory use after GGC: 19177k
Maximum of released memory in single GGC run: 2159k
Garbage: 68222k
Leak: 6718k
Overhead: 8029k
GGC runs: 405
comparing combine.c compilation at -O3 level:
Overall memory needed: 46895k
Peak memory use before GGC: 20389k
Peak memory use after GGC: 19559k
Maximum of released memory in single GGC run: 3148k
Garbage: 101149k
Leak: 6864k
Overhead: 12251k
GGC runs: 455
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 102951k -> 102947k
Peak memory use before GGC: 68624k
Peak memory use after GGC: 44728k
Maximum of released memory in single GGC run: 36429k
Garbage: 129360k
Leak: 9581k
Overhead: 16801k
GGC runs: 208
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 104327k
Peak memory use before GGC: 69786k
Peak memory use after GGC: 45996k
Maximum of released memory in single GGC run: 36430k
Garbage: 130583k
Leak: 11289k
Overhead: 17199k
GGC runs: 206
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 147583k -> 147591k
Peak memory use before GGC: 85946k
Peak memory use after GGC: 80068k
Maximum of released memory in single GGC run: 32841k
Garbage: 264361k
Leak: 9401k
Overhead: 27621k
GGC runs: 226
comparing insn-attrtab.c compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 196383k to 200459k, overall 2.08%
Overall memory needed: 196383k -> 200459k
Peak memory use before GGC: 87233k
Peak memory use after GGC: 80138k
Maximum of released memory in single GGC run: 30034k
Garbage: 301511k
Leak: 9399k
Overhead: 33447k
GGC runs: 248
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 196435k -> 191555k
Peak memory use before GGC: 87247k
Peak memory use after GGC: 80152k
Maximum of released memory in single GGC run: 30095k
Garbage: 302153k
Leak: 9404k
Overhead: 33645k
GGC runs: 248
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 174541k -> 174549k
Peak memory use before GGC: 90285k
Peak memory use after GGC: 89390k
Maximum of released memory in single GGC run: 17776k
Garbage: 207698k
Leak: 49110k
Overhead: 23556k
GGC runs: 410
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 192361k -> 192365k
Peak memory use before GGC: 102889k
Peak memory use after GGC: 101870k
Maximum of released memory in single GGC run: 18129k
Garbage: 214182k
Leak: 72423k
Overhead: 29451k
GGC runs: 383
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 168986k
Peak memory use before GGC: 101851k
Peak memory use after GGC: 100834k
Maximum of released memory in single GGC run: 17236k
Garbage: 344622k
Leak: 49818k
Overhead: 30146k
GGC runs: 526
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 171018k -> 171014k
Peak memory use before GGC: 102466k
Peak memory use after GGC: 101452k
Maximum of released memory in single GGC run: 17233k
Garbage: 373517k
Leak: 50850k
Overhead: 34086k
GGC runs: 562
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 173566k
Peak memory use before GGC: 104288k
Peak memory use after GGC: 103250k
Maximum of released memory in single GGC run: 17610k
Garbage: 390876k
Leak: 51133k
Overhead: 35453k
GGC runs: 572
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 244575k -> 244574k
Peak memory use before GGC: 80960k
Peak memory use after GGC: 58699k
Maximum of released memory in single GGC run: 44133k
Garbage: 144343k
Leak: 7611k
Overhead: 24815k
GGC runs: 79
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 245411k -> 245410k
Peak memory use before GGC: 81606k
Peak memory use after GGC: 59345k
Maximum of released memory in single GGC run: 44122k
Garbage: 144514k
Leak: 9378k
Overhead: 25310k
GGC runs: 89
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 245051k
Peak memory use before GGC: 85157k
Peak memory use after GGC: 74845k
Maximum of released memory in single GGC run: 36137k
Garbage: 222608k
Leak: 20854k
Overhead: 30547k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 498603k
Peak memory use before GGC: 79831k
Peak memory use after GGC: 74845k
Maximum of released memory in single GGC run: 33438k
Garbage: 229655k
Leak: 20944k
Overhead: 32629k
GGC runs: 91
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1188299k -> 1188303k
Peak memory use before GGC: 201747k
Peak memory use after GGC: 190209k
Maximum of released memory in single GGC run: 80701k
Garbage: 375660k
Leak: 46310k
Overhead: 49354k
GGC runs: 70
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-03-10 16:00:45.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-03-11 07:12:42.000000000 +0000
@@ -1,3 +1,40 @@
+2007-03-11 Steven Bosscher <steven@gcc.gnu.org>
+
+ * lower-subreg.c: Include except.h.
+ (decompose_multiword_subregs): Verify that the only control flow
+ insns we can split are loads to multi-words pseudos.
+ Handle breaking such blocks after splitting, instead of calling
+ find_many_sub_basic_blocks.
+
+ * loop-unroll.c (split_edge_and_insert): Don't set BB_SUPERBLOCK
+ on the new basic block. Add a lengthy comment explaining why we
+ thought this was necessary.
+ * cfglayout.c (cfg_layout_finalize): Don't break superblocks.
+
+2007-03-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/30924
+ * tree.c (walk_type_fields): Recurse into the element type of
+ ARRAY_TYPEs if there is a pointer set.
+
+2007-03-10 Dirk Mueller <dmueller@suse.de>
+
+ * c-common.c (warn_logical_operator): Fix condition.
+
+2007-03-10 Tobias Schl?ter <tobi@gcc.gnu.org>
+
+ * config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Add missing
+ quotation mark.
+ * config/darwin.c (machopic_select_section): Remove superfluous
+ argument in call to categorize_decl_for_section. Remove unused
+ variable shlib.
+
+2007-03-10 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac (glibc_header_dir): Set using with_build_sysroot if
+ defined.
+ * configure: Regenerate.
+
2007-03-10 Uros Bizjak <ubizjak@gmail.com>
PR target/31101
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-03-10 16:00:44.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-03-11 07:12:42.000000000 +0000
@@ -1,3 +1,14 @@
+2007-03-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/30274
+ * cp-tree.h (unlowered_expr_type): New function.
+ * typeck.c (is_bitfield_expr_with_lowered_type): Handle
+ COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
+ (unlowered_expr_type): New function.
+ (build_unary_op): Disallow predecrements of bool bitfields.
+ * call.c (build_conditional_expr): Use unlowered_expr_type.
+ * pt.c (type_unification_real): Likewise.
+
2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
PR c++/20599
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.