This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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: 7382k -> 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: 7402k -> 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: 7514k -> 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: 7522k -> 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: 7522k -> 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: 17838k -> 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: 19854k -> 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: 35262k -> 35259k
    Peak memory use before GGC: 19340k
    Peak memory use after GGC: 19125k
    Maximum of released memory in single GGC run: 2172k
    Garbage: 56694k -> 56722k
    Leak: 6607k
    Overhead: 6297k -> 6304k
    GGC runs: 352

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 68081k to 68222k, overall 0.21%
    Overall memory needed: 37570k -> 37575k
    Peak memory use before GGC: 19370k -> 19371k
    Peak memory use after GGC: 19177k
    Maximum of released memory in single GGC run: 2159k
    Garbage: 68081k -> 68222k
    Leak: 6726k -> 6718k
    Overhead: 8002k -> 8029k
    GGC runs: 405

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 100891k to 101149k, overall 0.26%
    Overall memory needed: 46894k -> 46895k
    Peak memory use before GGC: 20388k -> 20389k
    Peak memory use after GGC: 19558k -> 19559k
    Maximum of released memory in single GGC run: 3148k
    Garbage: 100891k -> 101149k
    Leak: 6864k
    Overhead: 12203k -> 12251k
    GGC runs: 455

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 102950k -> 102951k
    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: 104334k -> 104331k
    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: 147586k -> 147587k
    Peak memory use before GGC: 85946k
    Peak memory use after GGC: 80068k
    Maximum of released memory in single GGC run: 32841k
    Garbage: 264102k -> 264361k
    Leak: 9401k
    Overhead: 27570k -> 27621k
    GGC runs: 226

comparing insn-attrtab.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 300630k to 301511k, overall 0.29%
    Overall memory needed: 196462k -> 196399k
    Peak memory use before GGC: 87233k
    Peak memory use after GGC: 80138k
    Maximum of released memory in single GGC run: 30046k -> 30034k
    Garbage: 300630k -> 301511k
    Leak: 9399k
    Overhead: 33271k -> 33447k
    GGC runs: 247 -> 248

comparing insn-attrtab.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 301272k to 302153k, overall 0.29%
    Overall memory needed: 196518k -> 196443k
    Peak memory use before GGC: 87247k
    Peak memory use after GGC: 80152k
    Maximum of released memory in single GGC run: 30107k -> 30095k
    Garbage: 301272k -> 302153k
    Leak: 9404k
    Overhead: 33468k -> 33645k
    GGC runs: 247 -> 248

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 147363k -> 147356k
    Peak memory use before GGC: 90241k
    Peak memory use after GGC: 89347k
    Maximum of released memory in single GGC run: 17775k
    Garbage: 207686k
    Leak: 49044k
    Overhead: 23533k
    GGC runs: 410

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 165191k -> 165200k
    Peak memory use before GGC: 102846k
    Peak memory use after GGC: 101827k
    Maximum of released memory in single GGC run: 18129k
    Garbage: 214200k
    Leak: 72357k
    Overhead: 29428k
    GGC runs: 384

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 141810k -> 141811k
    Peak memory use before GGC: 101808k
    Peak memory use after GGC: 100791k
    Maximum of released memory in single GGC run: 17236k
    Garbage: 344608k -> 344614k
    Leak: 49752k
    Overhead: 30119k -> 30123k
    GGC runs: 527

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 143838k -> 143839k
    Peak memory use before GGC: 102423k -> 102422k
    Peak memory use after GGC: 101408k
    Maximum of released memory in single GGC run: 17233k
    Garbage: 373449k -> 373494k
    Leak: 50784k -> 50784k
    Overhead: 34047k -> 34060k
    GGC runs: 563

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 146406k -> 146407k
    Peak memory use before GGC: 104244k -> 104245k
    Peak memory use after GGC: 103207k
    Maximum of released memory in single GGC run: 17610k
    Garbage: 390791k -> 390836k
    Leak: 51067k -> 51067k
    Overhead: 35415k -> 35430k
    GGC runs: 573

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 244573k -> 244575k
    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: 245409k -> 245411k
    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: 245198k -> 245199k
    Peak memory use before GGC: 85157k
    Peak memory use after GGC: 74845k
    Maximum of released memory in single GGC run: 36137k
    Garbage: 222608k -> 222608k
    Leak: 20854k
    Overhead: 30547k
    GGC runs: 81

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 498606k -> 498603k
    Peak memory use before GGC: 79831k
    Peak memory use after GGC: 74845k
    Maximum of released memory in single GGC run: 33438k
    Garbage: 229655k -> 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: 1188234k -> 1188315k
    Peak memory use before GGC: 201747k
    Peak memory use after GGC: 190209k
    Maximum of released memory in single GGC run: 80701k
    Garbage: 375660k -> 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-09 09:21:21.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2007-03-10 00:49:29.000000000 +0000
@@ -1,3 +1,143 @@
+2007-03-09  Roger Sayle  <roger@eyesopen.com>
+
+	* fold-const.c (fold_comparison): Remove compile-time evaluation of
+	complex constant equality/inequality comparisons for here.
+	(fold_binary) <EQ_EXPR>: Simplify complex comparisons that are
+	known at compile-time or can be simplified to a scalar comparison.
+	(fold_relational_const): Move compile-time evaluation of complex
+	constant equality/inequality comparisons to here.
+
+2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
+
+	PR rtl-optimization/30643
+	* cse.c (cse_insn): Recompute dest_hash after insert_regs for
+	dest_addr_elt.
+	(fold_rtx): Recurse, like before 2006-11-03.
+
+2007-03-09  DJ Delorie  <dj@redhat.com>
+
+	* config/m32c/t-m32c (m32c-pragma.o): Add TM_H dependency to
+	m32c-pragma.o.
+
+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.
+
+2007-03-09  Chao-ying Fu  <fu@mips.com>
+
+	* doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
+	REV 2.
+	* doc/invoke.texi (-mdspr2): Document new option.
+	* config/mips/mips.md (UNSPEC_ABSQ_S_QB .. UNSPEC_DPSQX_SA_W_PH):
+	New unspec for DSP REV 2.
+	(<u>mulsidi3_32bit_internal): Check if !TARGET_DSPR2, because
+	these instructions are extended in DSP REV 2.
+	(mips-dspr2.md): Include.
+	* config/mips/mips.opt (mdspr2): New option.
+	* config/mips/mips.c (mips_function_type): Add MIPS_V4QI_FTYPE_V4QI,
+	MIPS_SI_FTYPE_SI_SI_SI, MIPS_DI_FTYPE_DI_USI_USI, MIPS_DI_FTYPE_SI_SI,
+	MIPS_DI_FTYPE_USI_USI, MIPS_V2HI_FTYPE_SI_SI_SI.
+	(override_options): Check TARGET_DSPR2 to enable MASK_DSP.
+	(CODE_FOR_mips_mul_ph): Define it to CODE_FOR_mulv2hi3.
+	(dsp_bdesc): Add DSP REV 2 builtins.  Remove 32-bit only DSP builtins.
+	(dsp_32only_bdesc): New description table for 32-bit only DSP REV 1
+	and 2 builtins.
+	(bdesc_map): Add one field of unsupported_target_flags.
+	(bdesc_arrays):  Update entries to have extra fields.  Add
+	dsp_32only_bdesc.
+	(mips_init_builtins): Initialize new function types.
+	Check unsupported_target_fileds to filter out builtins.
+	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dspr2 if
+	TARGET_DSPR2.
+	(ASM_SPEC): Pass mdspr2 to the assembler.
+	* config/mips/mips-dspr2.md: New file.
+
+2007-03-09  Sa Liu  <saliu@de.ibm.com>
+
+	* config/rs6000/altivec.md: Fix vcond patterns using if_then_else.
+
+2007-03-09  Ian Lance Taylor  <iant@google.com>
+
+	* opts.c (common_handle_option): Treat -Wstrict-overflow (with no
+	argument) like -Wstrict-overflow=2.
+	* doc/invoke.texi (Warning Options): Update documentation.
+
+2007-03-09  Dirk Mueller  <dmueller@suse.de>
+
+	PR c++/17946
+	* doc/invoke.texi (-Wlogical-op): Document.
+	* common.opt (-Wlogical-op): New.
+	* c-common.h (warn_logical_operator): Declare.
+	* c-common.c (warn_logical_operator): Define.
+	* c-typeck.c (parser_build_binary_op): Call
+	warn_logical_operator.
+
+2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
+
+	* rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
+	* final.c (final_scan_insn): Test for non-"" file name.
+
+2007-03-09  Sebastian Pop  <sebastian.pop@inria.fr>
+
+	* doc/loop.texi: Document the Omega linear constraints solver.
+	* doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars,
+	omega-max-geqs, omega-max-eqs, omega-max-wild-cards, 
+	omega-hash-table-size, omega-max-keys, and 
+	omega-eliminate-redundant-constraints.
+	* tree-pass.h (pass_check_data_deps): Declared.
+	* omega.c: New.
+	* omega.h: New.
+	* timevar.def (TV_CHECK_DATA_DEPS): Declared.
+	* tree-ssa-loop.c (check_data_deps, gate_check_data_deps, 
+	pass_check_data_deps): New.
+	* tree-data-ref.c (init_data_ref): Remove declaration.
+	(dump_data_dependence_relation): Dump DDR_INNER_LOOP.
+	(analyze_array): Renamed init_array_ref, move up initializations.
+	(init_data_ref): Renamed init_pointer_ref.  Moved before its call.
+	Removed arguments that are set to NULL.
+	(analyze_indirect_ref): Correct indentation, correct call to 
+	init_pointer_ref.
+	(object_analysis): Call init_array_ref instead of analyze_array.
+	(initialize_data_dependence_relation): Initialize DDR_INNER_LOOP.
+	(access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead
+	of DR_ACCESS_FNS_ADDR.
+	(init_omega_eq_with_af, omega_extract_distance_vectors, 
+	omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr,
+	ddr_consistent_p): New.
+	(compute_affine_dependence): Check consistency of ddrs when 
+	flag_check_data_deps is passed.
+	(analyze_all_data_dependences): Uncomment.
+	(tree_check_data_deps): New.
+	* tree-data-ref.h: Include omega.h.
+	(DR_ACCESS_FNS_ADDR): Removed.
+	(data_dependence_relation): Add inner_loop.
+	(DDR_INNER_LOOP): New.
+	* common.opt (fcheck-data-deps): New.
+	* tree-flow.h (tree_check_data_deps): Declare.
+	* Makefile.in (TREE_DATA_REF_H): Depend on omega.h.
+	(OBJS-common): Depend on omega.o.
+	(omega.o): Define.
+	* passes.c (pass_check_data_deps): Scheduled.
+	* params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, 
+	PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
+	PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS,
+	PARAM_VECT_MAX_VERSION_CHECKS,
+	PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New.
+
+2007-03-09  Richard Guenther  <rguenther@suse.de>
+
+	PR tree-optimization/30904
+	PR middle-end/31058
+	* tree-vrp.c (extract_range_from_binary_expr): Handle RSHIFT_EXPR
+	the same way as *_DIV_EXPR.
+
+2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
+
+	* recog.c (decode_asm_operands): No mixed declarations and code.
+
 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
 
 	* rtl.def (ASM_INPUT): Add location.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2007-03-08 17:48:26.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2007-03-10 00:49:28.000000000 +0000
@@ -1,3 +1,7 @@
+2007-03-09  Dirk Mueller  <dmueller@suse.de>
+
+	* cp/call.c (build_new_op): Call warn_logical_operator.
+
 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
 
 	PR c++/30852


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]