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: Mon, 12 Mar 2007 00:26:33 +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 -> 7382k
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 -> 7398k
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 -> 7510k
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 -> 7578k
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 -> 7578k
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: 17835k -> 17834k
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 -> 19854k
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: 35263k -> 35262k
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 -> 37578k
Peak memory use before GGC: 19371k
Peak memory use after GGC: 19177k
Maximum of released memory in single GGC run: 2159k
Garbage: 68222k -> 68222k
Leak: 6718k
Overhead: 8029k
GGC runs: 405
comparing combine.c compilation at -O3 level:
Overall memory needed: 46895k -> 46894k
Peak memory use before GGC: 20389k
Peak memory use after GGC: 19559k
Maximum of released memory in single GGC run: 3148k
Garbage: 101149k -> 101149k
Leak: 6864k
Overhead: 12251k
GGC runs: 455
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 102947k -> 102950k
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 -> 104330k
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: 147591k -> 145586k
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 needed: 200459k -> 196382k
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 allocated via mmap and sbrk increased from 191555k to 195834k, overall 2.23%
Overall memory needed: 191555k -> 195834k
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: 174549k -> 174541k
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: 192365k -> 192361k
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 -> 168985k
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: 171014k -> 171017k
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 -> 173573k
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: 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: 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 -> 244974k
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 -> 498678k
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: 1188303k -> 1188730k
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-11 07:12:42.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-03-11 22:22:54.000000000 +0000
@@ -1,3 +1,33 @@
+2007-03-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/31115
+ * tree-vrp.c (extract_range_from_binary_expr): Make sure
+ the shift count is positive and non-anti-range for RSHIFT_EXPR.
+ A shift count of zero is not special as with *_DIV_EXPR.
+ (vrp_int_const_binop): Handle RSHIFT_EXPR for determining overflow
+ direction.
+
+2007-03-11 Ian Lance Taylor <iant@google.com>
+
+ * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
+ the *_DIV_EXPR codes correctly with overflow infinities.
+
+2007-03-11 Ira Rosen <irar@il.ibm.com>
+
+ * tree-data-ref.c (analyze_offset): Add a return value (bool) to
+ indicate success/failure of the analysis. Add negation to subtrahend
+ in case of subtraction. Fail if both operands contain constants.
+ (create_data_ref): Fail if analyze_offset fails.
+
+2007-03-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (frndintxf2): Rename to ...
+ (rintxf2): ... this. Remove expander having same name.
+ (rintsf2, rintdf2): Implement using SSEMODEF macro.
+ (roundsf2, rounddf2): Ditto.
+ (lrint<mode>di2, lrint<mode>si2): Implement using SSEMODEI24 macro.
+ (lround<mode>di2, lround<mode>si2): Ditto.
+
2007-03-11 Steven Bosscher <steven@gcc.gnu.org>
* lower-subreg.c: Include except.h.
@@ -41,9 +71,9 @@
* config/i386/i386.md (UNSPEC_C2_FLAG): New constant.
(fpremxf4_i387, fprem1xf4_i387): Use UNSPEC_C2_FLAG.
(fmodxf3, fmod<mode>3, remainderxf3, remainder<mode>3):
- Add LABEL_NUSES to emmitted label.
+ Add LABEL_NUSES to emitted label.
* config/i386/i386.c (ix86_emit_fp_unordered_jump): Add
- branch probability value to emmitted jump insn.
+ branch probability value to emitted jump insn.
* reg-stack.c (subst_stack_regs_pat)[UNSPEC]: Handle UNSPEC_C2_FLAG.
Do not check life information and do not re-arrange input operands
for UNSPEC_FSCALE_EXP, UNSPEC_FPREM_U and UNSPEC_FPREM1_U.
@@ -160,10 +190,10 @@
2007-03-09 Aldy Hernandez <aldyh@redhat.com>
- PR tree-optimization/30375
- * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
- LHS of statements is not the same.
- * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.
+ PR tree-optimization/30375
+ * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
+ LHS of statements is not the same.
+ * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.
2007-03-09 Chao-ying Fu <fu@mips.com>
@@ -618,10 +648,11 @@
x86_sse_unaligned_move_optimal, x86_sse_typeless_stores,
x86_sse_load0_by_pxor, x86_use_ffreep, x86_use_incdec,
x86_inter_unit_moves, x86_ext_80387_constants, x86_four_jump_limit,
- x86_schedule, x86_use_bt, x86_pad_returns): Merge into ...
+ x86_schedule, x86_use_bt, x86_pad_returns,
+ x86_use_xchgb): Merge into ...
(ix86_tune_features): ... here. New array.
- (x86_cmove, x86_use_xchgb, x86_cmpxchg, x86_cmpxchg8b,
- x86_xadd, x86_bswap): Merge into ...
+ (x86_cmove, x86_cmpxchg, x86_cmpxchg8b, x86_xadd,
+ x86_bswap): Merge into ...
(ix86_arch_features): ... here. New array.
(x86_3dnow_a): Remove.
(x86_accumulate_outgoing_args): Make static.
@@ -875,7 +906,7 @@
2007-03-05 Mike Stump <mrs@apple.com>
- * c-common.c (targetcm): Add.
+ * c-common.c (targetcm): Add.
* c-opts.c (c_common_handle_option): Handle language specific
target options.
* opts.c (handle_option): Verify language for target options, if
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.