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: 7383k -> 7381k
    Peak memory use before GGC: 2269k
    Peak memory use after GGC: 1958k
    Maximum of released memory in single GGC run: 311k
    Garbage: 446k
    Leak: 2292k
    Overhead: 456k
    GGC runs: 3

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 7399k -> 7397k
    Peak memory use before GGC: 2297k
    Peak memory use after GGC: 1986k
    Maximum of released memory in single GGC run: 311k
    Garbage: 449k
    Leak: 2325k
    Overhead: 461k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 7515k -> 7513k
    Peak memory use before GGC: 2269k
    Peak memory use after GGC: 1958k
    Maximum of released memory in single GGC run: 311k
    Garbage: 452k
    Leak: 2295k
    Overhead: 457k
    GGC runs: 4

comparing empty function compilation at -O2 level:
    Overall memory needed: 7523k -> 7521k
    Peak memory use before GGC: 2270k
    Peak memory use after GGC: 1959k
    Maximum of released memory in single GGC run: 311k
    Garbage: 455k
    Leak: 2295k
    Overhead: 457k
    GGC runs: 4

comparing empty function compilation at -O3 level:
    Overall memory needed: 7523k -> 7521k
    Peak memory use before GGC: 2270k
    Peak memory use after GGC: 1959k
    Maximum of released memory in single GGC run: 311k
    Garbage: 455k
    Leak: 2295k
    Overhead: 457k
    GGC runs: 4

comparing combine.c compilation at -O0 level:
    Overall memory needed: 17847k -> 17849k
    Peak memory use before GGC: 9271k
    Peak memory use after GGC: 8858k
    Maximum of released memory in single GGC run: 2578k
    Garbage: 36923k
    Leak: 6587k
    Overhead: 5038k
    GGC runs: 279

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 19867k -> 19865k
    Peak memory use before GGC: 10887k
    Peak memory use after GGC: 10518k
    Maximum of released memory in single GGC run: 2354k
    Garbage: 37493k
    Leak: 9480k
    Overhead: 5743k
    GGC runs: 268

comparing combine.c compilation at -O1 level:
    Overall memory needed: 35279k -> 35273k
    Peak memory use before GGC: 19349k
    Peak memory use after GGC: 19134k
    Maximum of released memory in single GGC run: 2169k
    Garbage: 57237k
    Leak: 6616k
    Overhead: 6375k
    GGC runs: 350

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 68575k to 68647k, overall 0.10%
    Overall memory needed: 37631k -> 37629k
    Peak memory use before GGC: 19386k -> 19387k
    Peak memory use after GGC: 19184k
    Maximum of released memory in single GGC run: 2156k
    Garbage: 68575k -> 68647k
    Leak: 6725k -> 6718k
    Overhead: 7999k -> 8006k
    GGC runs: 404

comparing combine.c compilation at -O3 level:
    Overall memory needed: 47011k -> 47009k
    Peak memory use before GGC: 20423k
    Peak memory use after GGC: 19540k
    Maximum of released memory in single GGC run: 3134k -> 3147k
    Garbage: 101042k -> 101052k
    Leak: 6866k -> 6862k
    Overhead: 12242k -> 12242k
    GGC runs: 451 -> 452

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 102963k -> 102965k
    Peak memory use before GGC: 68633k
    Peak memory use after GGC: 44737k
    Maximum of released memory in single GGC run: 36429k
    Garbage: 129356k
    Leak: 9590k
    Overhead: 16801k
    GGC runs: 207

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 104339k -> 104341k
    Peak memory use before GGC: 69795k
    Peak memory use after GGC: 46005k
    Maximum of released memory in single GGC run: 36430k
    Garbage: 130578k
    Leak: 11298k
    Overhead: 17199k
    GGC runs: 206

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 147591k -> 147589k
    Peak memory use before GGC: 85871k
    Peak memory use after GGC: 80078k
    Maximum of released memory in single GGC run: 32814k
    Garbage: 263555k
    Leak: 9410k
    Overhead: 27491k
    GGC runs: 225

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 196487k -> 191225k
    Peak memory use before GGC: 87187k
    Peak memory use after GGC: 80148k
    Maximum of released memory in single GGC run: 30016k -> 30017k
    Garbage: 300057k -> 300058k
    Leak: 9407k -> 9407k
    Overhead: 33191k
    GGC runs: 245

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 191227k -> 191225k
    Peak memory use before GGC: 87200k
    Peak memory use after GGC: 80161k
    Maximum of released memory in single GGC run: 30079k
    Garbage: 300723k -> 300724k
    Leak: 9412k -> 9412k
    Overhead: 33391k
    GGC runs: 245

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 147373k -> 147339k
    Peak memory use before GGC: 90250k
    Peak memory use after GGC: 89356k
    Maximum of released memory in single GGC run: 17775k
    Garbage: 207694k
    Leak: 49052k
    Overhead: 23533k
    GGC runs: 411

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 165161k -> 165163k
    Peak memory use before GGC: 102855k
    Peak memory use after GGC: 101836k
    Maximum of released memory in single GGC run: 18129k
    Garbage: 214214k
    Leak: 72366k
    Overhead: 29428k
    GGC runs: 383

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 141840k -> 141838k
    Peak memory use before GGC: 101824k
    Peak memory use after GGC: 100801k
    Maximum of released memory in single GGC run: 17236k
    Garbage: 344089k
    Leak: 49761k
    Overhead: 30048k
    GGC runs: 527

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 143836k -> 143838k
    Peak memory use before GGC: 102492k -> 102495k
    Peak memory use after GGC: 101449k
    Maximum of released memory in single GGC run: 17233k
    Garbage: 372851k -> 372947k
    Leak: 50753k -> 50753k
    Overhead: 33992k -> 33993k
    GGC runs: 561 -> 562

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 146400k -> 146398k
    Peak memory use before GGC: 104249k -> 104251k
    Peak memory use after GGC: 103216k
    Maximum of released memory in single GGC run: 17610k
    Garbage: 390177k -> 390273k
    Leak: 51037k -> 51037k
    Overhead: 35341k -> 35342k
    GGC runs: 572

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 244619k -> 244621k
    Peak memory use before GGC: 80969k
    Peak memory use after GGC: 58708k
    Maximum of released memory in single GGC run: 44133k
    Garbage: 144295k
    Leak: 7619k
    Overhead: 24814k
    GGC runs: 79

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 245427k -> 245425k
    Peak memory use before GGC: 81615k
    Peak memory use after GGC: 59354k
    Maximum of released memory in single GGC run: 44123k
    Garbage: 144570k
    Leak: 9387k
    Overhead: 25310k
    GGC runs: 89

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 245063k -> 245061k
    Peak memory use before GGC: 85141k
    Peak memory use after GGC: 74853k
    Maximum of released memory in single GGC run: 36136k
    Garbage: 222588k
    Leak: 20863k
    Overhead: 30547k
    GGC runs: 81

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 498331k -> 498141k
    Peak memory use before GGC: 79840k
    Peak memory use after GGC: 74854k
    Maximum of released memory in single GGC run: 33438k
    Garbage: 229631k
    Leak: 20953k
    Overhead: 32629k
    GGC runs: 91

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 1187339k -> 1186801k
    Peak memory use before GGC: 201756k
    Peak memory use after GGC: 190218k
    Maximum of released memory in single GGC run: 80702k
    Garbage: 375646k
    Leak: 46318k
    Overhead: 49354k
    GGC runs: 70

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2007-03-02 05:59:33.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2007-03-02 22:37:37.000000000 +0000
@@ -1,3 +1,140 @@
+2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* tree-sra.c (sra_walk_fns) <ldst>: Document new restriction.
+	(sra_walk_modify_expr) <rhs_elt>: Treat the reference as a use
+	if the lhs has side-effects.
+	<lhs_elt>: Treat the reference as a use if the rhs has side-effects.
+
+2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.h (TUNEMASK): Remove define.
+	(ARCHMASK): Remove define.
+	(TARGET_*): Use ix86_tune_mask variable instead of TUNEMASK.
+	 Use ix86_arch_mask variable instead of ARCHMASK.
+	* config/i386/i386.c (override_options): Ditto.
+	(standard_80387_constant_p): Ditto.
+
+2007-03-02  Ian Lance Taylor  <iant@google.com>
+
+	Used signed infinities in VRP.
+	* tree-vrp.c (uses_overflow_infinity): New static function.
+	(supports_overflow_infinity): New static function.
+	(make_overflow_infinity): New static function.
+	(negative_overflow_infinity): New static function.
+	(positive_overflow_infinity): New static function.
+	(is_negative_overflow_infinity): New static function.
+	(is_positive_overflow_infinity): New static function.
+	(is_overflow_infinity): New static function.
+	(overflow_infinity_range_p): New static function.
+	(compare_values_warnv): New function split out of compare_values.
+	(compare_value): Call it.
+	(set_value_range_to_nonnegative): Add overflow_infinity
+	parameter.  Change caller.
+	(vrp_expr_computes_nonnegative): Add strict_overflow_p parameter.
+	Change callers.
+	(vrp_expr_computes_nonzero): Likewise.
+	(compare_ranges, compare_range_with_value): Likewise.
+	(compare_name_with_value, compare_names): Likewise.
+	(vrp_evaluate_conditional): Likewise.
+	(set_value_range): Handle infinity
+	(vrp_operand_equal_p, operand_less_p): Likewise.
+	(extract_range_from_assert): Likewise.
+	(vrp_int_const_binop): Likewise.
+	(extract_range_from_binary_expr): Likewise.
+	(extract_range_from_unary_expr): Likewise.
+	(extract_range_from_comparison): Likewise.
+	(extract_range_from_expr): Likewise.
+	(dump_value_range): Likewise.
+	(vrp_visit_cond_stmt, vrp_visit_phi_node): Likewise.
+	(test_for_singularity): Likewise.
+	(vrp_int_const_binop): Remove inline qualifier.
+	(adjust_range_with_scev): Add comment.
+	* tree-flow.h (vrp_evaluate_conditional): Update declaration.
+
+2007-03-02  Diego Novillo  <dnovillo@redhat.com>
+
+	* tree-ssa-structalias.c (could_have_pointers): Tidy.
+	(get_constraint_for): Likewise.
+	(do_structure_copy): Likewise.
+	(find_func_aliases): Fix references to MODIFY_EXPR.
+	(intra_create_variable_infos): Tidy.
+	* tree-ssa-operands.c (add_virtual_operand): Add argument
+	IS_CALL_SITE.
+	When adding members of alias sets, if IS_CALL_SITE is true and
+	the symbol is not call-clobbered, skip it.
+	Adjust all callers.
+
+2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns at the
+	entry by means of emit_insn_at_entry.
+
+2007-03-02  Richard Henderson  <rth@redhat.com>
+
+	* expr.h (promoted_input_arg): Remove decl.
+	* function.c (promoted_input_arg): Merge into ...
+	* combine.c (setup_incoming_promotions): ... only caller.
+	Rearrange to avoid double loop.
+
+2007-03-02  Ben Elliston  <bje@au.ibm.com>
+	    Peter Bergner  <bergner@vnet.ibm.com>
+	    Janis Johnson  <janis187@us.ibm.com>
+
+	* config/rs6000/dfp.md: New file.
+	* config/rs6000/rs6000.md: Include dfp.md.
+	(add<mode>3_internal1): Disable for DECIMAL_FLOAT_MODE_P operands.
+	* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Handle DDmode
+	and TDmode decimal float modes in FP registers.
+	(num_insns_constant): Likewise.
+	(rs6000_legitimate_offset_address_p): Likewise.
+	(rs6000_legitimize_address): Likewise.
+	(rs6000_legitimize_reload_address): Likewise.
+	(rs6000_legitimate_address): Likewise.
+	(rs6000_emit_move): Likewise.
+	(function_arg_boundary): Likewise.
+	(function_arg_advance): Likewise.
+	(rs6000_darwin64_record_arg_recurse): Likewise.
+	(function_arg): Likewise.
+	(rs6000_gimplify_va_arg): Likewise.
+	(rs6000_split_multireg_move): Likewise.
+	(rs6000_output_function_epilogue): Likewise.
+	(rs6000_output_function_epilogue): Likewise.
+	(rs6000_register_move_cost): Likewise.
+	(rs6000_function_value): Likewise.
+	(rs6000_libcall_value): Likewise.
+
+2007-03-02  Richard Sandiford  <richard@codesourcery.com>
+
+	* config/t-vxworks (LIMITS_H_TEST): Define to true for VxWorks.
+
+2007-03-02  Richard Sandiford  <richard@codesourcery.com>
+
+	* config/t-vxworks (LIBGCC2_INCLUDES): Pass -nostdinc.
+	Use $MULTIDIR to choose between the kernel and RTP headers,
+	and use $WIND_BASE and $WIND_USR to locate them.
+
+2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/i386/i386.c (override_options): Put initialization of
+	ix86_tune_mask and ix86_arch_mask to the correct place.
+
+2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
+	    Michael Meissner  <michael.meissner@amd.com>
+
+	PR target/31019
+	* config/i386/i386.h (TUNEMASK): Redefine to use ix86_tune_mask.
+	(ARCHMASK): Define.
+	(TARGET_CMOVE): Use ARCHMASK.
+	(TARGET_CMPXCHG): Ditto.
+	(TARGET_CMPXCHG8B): Ditto.
+	(TARGET_XADD): Ditto.
+	(TARGET_BSWAP): Ditto.
+	* config/i386/i386.c (ix86_tune_mask): New global variable.
+	(ix86_arch_mask): Ditto.
+	(override_options): Initialize ix86_tune_mask and
+	ix86_arch_mask. Use ARCHMASK to clear MASK_NO_FANCY_MATH_387 in
+	target_flags.
+
 2007-03-02  Ben Elliston  <bje@au.ibm.com>
 
 	PR 30992
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2007-03-02 05:59:31.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2007-03-02 22:37:36.000000000 +0000
@@ -1,3 +1,19 @@
+2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
+
+	PR c++/28253
+	* class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
+	for thunks.
+
+2007-03-02  Geoffrey Keating  <geoffk@apple.com>
+
+	* g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
+	Objective-C++.  Don't exit early if -shared-libgcc needs to be
+	added.
+
+2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+	* typeck.c (common_base_type): Delete unused function.
+	
 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
 
 	* Make-lang.in: Add dummy lang.install-pdf target.


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]