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: Tue, 05 Jun 2007 12:07:36 +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: 7416k -> 7417k
Peak memory use before GGC: 2349k -> 2351k
Peak memory use after GGC: 2014k -> 2015k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 489k -> 489k
Leak: 2277k -> 2278k
Overhead: 404k -> 404k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7432k -> 7433k
Peak memory use before GGC: 2377k -> 2378k
Peak memory use after GGC: 2042k -> 2043k
Maximum of released memory in single GGC run: 335k
Garbage: 491k -> 491k
Leak: 2310k -> 2311k
Overhead: 408k -> 409k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 7524k -> 7525k
Peak memory use before GGC: 2349k -> 2351k
Peak memory use after GGC: 2014k -> 2015k
Maximum of released memory in single GGC run: 335k -> 336k
Garbage: 494k -> 494k
Leak: 2279k -> 2281k
Overhead: 404k -> 405k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7532k -> 7533k
Peak memory use before GGC: 2350k -> 2351k
Peak memory use after GGC: 2014k -> 2015k
Maximum of released memory in single GGC run: 336k
Garbage: 497k -> 498k
Leak: 2280k -> 2281k
Overhead: 405k -> 405k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 7532k -> 7533k
Peak memory use before GGC: 2350k -> 2351k
Peak memory use after GGC: 2014k -> 2015k
Maximum of released memory in single GGC run: 336k
Garbage: 497k -> 498k
Leak: 2280k -> 2281k
Overhead: 405k -> 405k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 17648k -> 17645k
Peak memory use before GGC: 8980k -> 8983k
Peak memory use after GGC: 8214k -> 8216k
Maximum of released memory in single GGC run: 1875k
Garbage: 37733k -> 37736k
Leak: 6766k -> 6768k
Overhead: 4594k -> 4594k
GGC runs: 278 -> 277
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 19524k -> 19537k
Peak memory use before GGC: 10715k -> 10721k
Peak memory use after GGC: 9922k -> 9923k
Maximum of released memory in single GGC run: 1559k -> 1558k
Garbage: 38077k -> 38057k
Leak: 9651k -> 9661k
Overhead: 5299k -> 5300k
GGC runs: 269 -> 270
comparing combine.c compilation at -O1 level:
Overall memory needed: 29968k -> 29957k
Peak memory use before GGC: 17663k -> 17664k
Peak memory use after GGC: 17459k -> 17461k
Maximum of released memory in single GGC run: 1448k -> 1449k
Garbage: 50501k -> 50512k
Leak: 6834k -> 6827k
Overhead: 5634k -> 5634k
GGC runs: 353
comparing combine.c compilation at -O2 level:
Overall memory needed: 34372k -> 34357k
Peak memory use before GGC: 17715k -> 17716k
Peak memory use after GGC: 17519k -> 17520k
Maximum of released memory in single GGC run: 1390k
Garbage: 67373k -> 67387k
Leak: 6943k -> 6945k
Overhead: 7776k -> 7777k
GGC runs: 416 -> 417
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7061k to 7070k, overall 0.13%
Overall memory needed: 40764k -> 40769k
Peak memory use before GGC: 17922k -> 17923k
Peak memory use after GGC: 17663k -> 17664k
Maximum of released memory in single GGC run: 3637k
Garbage: 92482k -> 92467k
Leak: 7061k -> 7070k
Overhead: 10981k -> 10980k
GGC runs: 443 -> 442
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 9497k to 9739k, overall 2.54%
Overall memory needed: 92892k -> 92893k
Peak memory use before GGC: 58854k -> 58855k
Peak memory use after GGC: 33349k -> 33350k
Maximum of released memory in single GGC run: 33675k -> 33674k
Garbage: 129451k -> 129179k
Leak: 9497k -> 9739k
Overhead: 13788k -> 13788k
GGC runs: 215
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 94160k -> 94153k
Peak memory use before GGC: 60016k -> 60017k
Peak memory use after GGC: 34510k -> 34511k
Maximum of released memory in single GGC run: 33676k -> 33675k
Garbage: 129394k -> 129394k
Leak: 11446k -> 11447k
Overhead: 14185k -> 14185k
GGC runs: 213
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 107596k -> 107621k
Peak memory use before GGC: 58483k -> 58476k
Peak memory use after GGC: 53813k -> 53818k
Maximum of released memory in single GGC run: 24263k -> 24262k
Garbage: 211692k -> 211671k
Leak: 9622k -> 9624k
Overhead: 23938k -> 23938k
GGC runs: 243
comparing insn-attrtab.c compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 163736k to 168297k, overall 2.79%
Overall memory needed: 163736k -> 168297k
Peak memory use before GGC: 58364k -> 58362k
Peak memory use after GGC: 53907k -> 53908k
Maximum of released memory in single GGC run: 20513k -> 20512k
Garbage: 246389k -> 246390k
Leak: 9617k -> 9618k
Overhead: 29481k -> 29482k
GGC runs: 264
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 178300k -> 178321k
Peak memory use before GGC: 69170k -> 69172k
Peak memory use after GGC: 64711k -> 64712k
Maximum of released memory in single GGC run: 22127k -> 22128k
Garbage: 275540k -> 275537k
Leak: 9627k -> 9628k
Overhead: 31207k -> 31206k
GGC runs: 264
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 147281k -> 147300k
Peak memory use before GGC: 90173k -> 90174k
Peak memory use after GGC: 89268k -> 89269k
Maximum of released memory in single GGC run: 18609k
Garbage: 208442k -> 208435k
Leak: 51105k -> 51106k
Overhead: 23465k -> 23465k
GGC runs: 409
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 165329k -> 165352k
Peak memory use before GGC: 102909k -> 102911k
Peak memory use after GGC: 101886k -> 101887k
Maximum of released memory in single GGC run: 19093k
Garbage: 214129k -> 214106k
Leak: 74414k -> 74416k
Overhead: 29361k -> 29361k
GGC runs: 382
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 144783k -> 144747k
Peak memory use before GGC: 102822k -> 102824k
Peak memory use after GGC: 101763k -> 101765k
Maximum of released memory in single GGC run: 17649k
Garbage: 341547k -> 341528k
Leak: 51643k -> 51645k
Overhead: 31059k -> 31059k
GGC runs: 527
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 150447k -> 150407k
Peak memory use before GGC: 102768k -> 102772k
Peak memory use after GGC: 101749k -> 101752k
Maximum of released memory in single GGC run: 17651k -> 17650k
Garbage: 390633k -> 390707k
Leak: 52874k -> 52875k
Overhead: 36793k -> 36799k
GGC runs: 575
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 152063k -> 152067k
Peak memory use before GGC: 104742k -> 104743k
Peak memory use after GGC: 103703k -> 103704k
Maximum of released memory in single GGC run: 18053k
Garbage: 425259k -> 425320k
Leak: 53171k -> 53173k
Overhead: 39401k -> 39390k
GGC runs: 602
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 287747k -> 287755k
Peak memory use before GGC: 103120k -> 103121k
Peak memory use after GGC: 58773k -> 58775k
Maximum of released memory in single GGC run: 50583k -> 50582k
Garbage: 178436k -> 178492k
Leak: 7626k -> 7628k
Overhead: 29160k -> 29161k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 288547k -> 288543k
Peak memory use before GGC: 103766k -> 103768k
Peak memory use after GGC: 59420k -> 59421k
Maximum of released memory in single GGC run: 50582k -> 50583k
Garbage: 178589k
Leak: 9394k -> 9396k
Overhead: 29656k -> 29656k
GGC runs: 89
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 538976k -> 538497k
Peak memory use before GGC: 148302k -> 148303k
Peak memory use after GGC: 94020k -> 94021k
Maximum of released memory in single GGC run: 76096k -> 76095k
Garbage: 321859k -> 321868k
Leak: 22573k -> 22574k
Overhead: 49023k -> 49023k
GGC runs: 85
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 283204k -> 283213k
Peak memory use before GGC: 118542k -> 118547k
Peak memory use after GGC: 94020k -> 94017k
Maximum of released memory in single GGC run: 57285k -> 57289k
Garbage: 330345k -> 330350k
Leak: 22663k -> 22665k
Overhead: 52643k -> 52643k
GGC runs: 93
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Testing has produced no results
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-06-04 15:28:36.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-06-05 08:55:55.000000000 +0000
@@ -1,3 +1,57 @@
+2007-06-05 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (override_options): Use
+ TARGET_SUBTARGET32_ISA_DEFAULT to select default ix86_isa_flags.
+
+2007-06-05 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/predicates.md (reg_not_xmm0_operand): New predicate.
+ (nonimm_not_xmm0_operand): Ditto.
+ * config/i386/sse.md ("sse4_1_blendvpd"): Use "reg_not_xmm0_operand"
+ as operand[0] and operand[1] predicate. Use "nonimm_not_xmm0_operand"
+ as operand[2] predicate. Require "z" class XMM register for
+ operand[3]. Adjust asm template.
+ ("sse4_1_blendvpd"): Ditto.
+ ("sse4_1_pblendvb"): Ditto.
+ * config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Do not
+ force op2 into xmm0 register for variable blend instructions.
+
+2007-06-04 Tom Tromey <tromey@redhat.com>
+
+ * c-tree.h (start_enum): Update.
+ (build_enumerator): Likewise.
+ * c-decl.c (enum_next_value): Removed.
+ (enum_overflow): Likewise.
+ (start_enum): Add c_enum_contents argument. Don't use globals.
+ (build_enumerator): Likewise.
+ * c-tree.h (struct c_enum_contents): New struct.
+
+2007-06-04 Tom Tromey <tromey@redhat.com>
+
+ * c-common.c (c_common_get_alias_set): Fix indentation.
+
+2007-06-04 Ian Lance Taylor <iant@google.com>
+
+ * tree-vrp.c (adjust_range_with_scev): When loop is not expected
+ to overflow, reduce overflow infinity to regular infinity.
+ (vrp_var_may_overflow): New static function.
+ (vrp_visit_phi_node): Check vrp_var_may_overflow.
+
+2007-06-04 Kazu Hirata <kazu@codesourcery.com>
+
+ * stor-layout.c (layout_type): Remove duplicate code.
+
+2007-06-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR c/32191
+ * gcc/c-common.c (c_define_builtins): Call targetm.init_builtins ()
+ before build_common_builtin_nodes ().
+
+2007-06-04 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/31733
+ * cfgrtl.c (rtl_verify_flow_info): Skip notes when looking for barrier.
+
2007-05-31 Jan Hubicka <jh@suse.cz>
* tree-predcom.c (replace_ref_with, initialize_root_vars_lm,
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-06-01 07:59:20.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-06-05 08:55:51.000000000 +0000
@@ -1,3 +1,7 @@
+2007-06-04 Paolo Carlini <pcarlini@suse.de>
+
+ * call.c (convert_like_real): Remove pointless code.
+
2007-05-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (get_atexit_fn_ptr_type): New function.
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.