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]

Some aspect of GCC memory consumption increased by recent patch


Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:


comparing combine.c compilation at -O0 level:
    Overall memory needed: 24669k -> 24665k
    Peak memory use before GGC: 9358k
    Peak memory use after GGC: 8673k
    Maximum of released memory in single GGC run: 2863k
    Garbage: 41664k
    Leak: 6395k
    Overhead: 5772k
    GGC runs: 327

comparing combine.c compilation at -O1 level:
  Ovarall memory allocated via mmap and sbrk decreased from 25517k to 24437k, overall -4.42%
  Peak amount of GGC memory allocated before garbage collecting run decreased from 9225k to 8673k, overall -6.36%
  Peak amount of GGC memory still allocated after garbage collecting decreased from 8740k to 8093k, overall -7.99%
  Amount of produced GGC garbage decreased from 60428k to 58465k, overall -3.36%
    Overall memory needed: 25517k -> 24437k
    Peak memory use before GGC: 9225k -> 8673k
    Peak memory use after GGC: 8740k -> 8093k
    Maximum of released memory in single GGC run: 2026k
    Garbage: 60428k -> 58465k
    Leak: 6755k -> 6755k
    Overhead: 9931k -> 9677k
    GGC runs: 500 -> 499

comparing combine.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 28901k to 29145k, overall 0.84%
    Overall memory needed: 28901k -> 29145k
    Peak memory use before GGC: 12670k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 2597k
    Garbage: 78374k -> 77939k
    Leak: 6593k
    Overhead: 13974k -> 13795k
    GGC runs: 510 -> 516

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 7177k to 7199k, overall 0.30%
    Overall memory needed: 31545k -> 30949k
    Peak memory use before GGC: 12773k
    Peak memory use after GGC: 12544k
    Maximum of released memory in single GGC run: 3434k -> 3426k
    Garbage: 105579k -> 105098k
    Leak: 7177k -> 7199k
    Overhead: 18736k -> 18547k
    GGC runs: 577 -> 579

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 114136k
    Peak memory use before GGC: 74747k
    Peak memory use after GGC: 45493k
    Maximum of released memory in single GGC run: 39340k
    Garbage: 152668k
    Leak: 10984k
    Overhead: 19970k
    GGC runs: 274

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 124000k -> 124076k
    Peak memory use before GGC: 78747k -> 78641k
    Peak memory use after GGC: 70087k -> 70035k
    Maximum of released memory in single GGC run: 40780k
    Garbage: 369646k -> 369107k
    Leak: 11361k
    Overhead: 69421k -> 69092k
    GGC runs: 398

comparing insn-attrtab.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 147644k to 149144k, overall 1.02%
    Overall memory needed: 147644k -> 149144k
    Peak memory use before GGC: 97758k -> 97603k
    Peak memory use after GGC: 83478k -> 83422k
    Maximum of released memory in single GGC run: 39384k
    Garbage: 483554k -> 483019k
    Leak: 11242k
    Overhead: 84511k -> 84182k
    GGC runs: 342

comparing insn-attrtab.c compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 147696k to 149176k, overall 1.00%
    Overall memory needed: 147696k -> 149176k
    Peak memory use before GGC: 97759k -> 97605k
    Peak memory use after GGC: 83480k -> 83424k
    Maximum of released memory in single GGC run: 39384k
    Garbage: 484361k -> 483826k
    Leak: 11279k -> 11279k
    Overhead: 84640k -> 84311k
    GGC runs: 348

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111060k
    Peak memory use before GGC: 87161k
    Peak memory use after GGC: 85900k
    Maximum of released memory in single GGC run: 19511k
    Garbage: 246197k
    Leak: 55513k
    Overhead: 43275k
    GGC runs: 366

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 103921k -> 103917k
    Peak memory use before GGC: 86019k
    Peak memory use after GGC: 85119k
    Maximum of released memory in single GGC run: 18950k
    Garbage: 435900k -> 434013k
    Leak: 56846k -> 56846k
    Overhead: 65031k -> 64715k
    GGC runs: 512 -> 511

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 104129k
    Peak memory use before GGC: 86019k
    Peak memory use after GGC: 85119k
    Maximum of released memory in single GGC run: 18950k
    Garbage: 479102k -> 477214k
    Leak: 57414k -> 57413k
    Overhead: 74628k -> 74344k
    GGC runs: 573 -> 570

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 105217k -> 105201k
    Peak memory use before GGC: 87156k
    Peak memory use after GGC: 86199k
    Maximum of released memory in single GGC run: 19400k
    Garbage: 483860k -> 482400k
    Leak: 57585k
    Overhead: 75213k -> 75040k
    GGC runs: 560 -> 559

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-02-22 22:06:40.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-02-23 07:08:37.000000000 +0000
@@ -1,3 +1,62 @@
+2005-02-22  Diego Novillo  <dnovillo@redhat.com>
+
+	PR tree-optimization/20100
+	PR tree-optimization/20115
+	* tree-optimize.c (init_tree_optimization_passes): Remove
+	pass_maybe_create_global_var.
+	* tree-pass.h (pass_maybe_create_global_var): Remove.
+	* tree-ssa-alias.c (aliases_computed_p): Declare.
+	(struct alias_info): Add field NUM_PURE_CONST_CALLS_FOUND.
+	(count_calls_and_maybe_create_global_var): Remove.
+	(pass_maybe_create_global_var): Remove.
+	(init_alias_info): Do not declare aliases_computed_p.
+	(maybe_create_global_var): If the function contains no
+	call-clobbered variables and a mix of pure/const and regular
+	function calls, create .GLOBAL_VAR.
+	Mark all call-clobbered variables for renaming.
+	(merge_pointed_to_info): Update comment.
+	(add_pointed_to_var): Likewise.
+	(is_escape_site): Likewise.
+	Accept struct alias_info * instead of size_t *.
+	Update all users.
+	Update AI->NUM_CALLS_FOUND and AI->NUM_PURE_CONST_CALLS_FOUND
+	as necessary.
+	* tree-ssa-operands.c (get_call_expr_operands): If
+	ALIASES_COMPUTED_P is false, do not add call-clobbering
+	operands.
+	* tree-ssa.c (init_tree_ssa): Set ALIASES_COMPUTED_P to false.
+	(delete_tree_ssa): Likewise.
+
+2005-02-22  James E Wilson  <wilson@specifixinc.com>
+
+	* toplev.c (backend_init): Don't call init_adjust_machine_modes here.
+	(do_compile): Do call it here.
+
+2005-02-22  Kazu Hirata  <kazu@cs.umass.edu>
+
+	PR rtl-optimization/20017.
+	* passes.c (rest_of_handle_combine, rest_of_handle_cse,
+	rest_of_handle_cse2, rest_of_handle_gcse): Call
+	delete_dead_jumptables immediately before calling cleanup_cfg.
+
+2005-02-22  Devang Patel  <dpatel@apple.com>
+
+	PR 19952
+	* tree-if-conv.c (process_phi_nodes): Use bsi_after_labels and skip 
+	all labels
+	
+2005-02-22  David Edelsohn  <edelsohn@gnu.org>
+
+	* config/rs6000/aix.h (WINT_TYPE): Define.
+
+2005-02-22  Stan Shebs  <shebs@apple.com>
+
+	* config/rs6000/rs6000.c (rs6000_override_options): Default to
+	natural alignment for 64-bit Darwin.
+	(rs6000_parse_alignment_option): Warn about uses of -malign-power
+	on 64-bit Darwin.
+	* doc/invoke.texi: Document this.
+
 2005-02-22  DJ Delorie  <dj@redhat.com>
 
 	* c-common.c (c_common_type_for_mode): Pass the mode's precision
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2005-02-22 22:06:42.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2005-02-23 07:08:39.000000000 +0000
@@ -1,5 +1,28 @@
 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
 
+	PR c++/20073
+	* decl.c (start_decl_1): Don't clear TREE_READONLY.
+	(cp_finish_decl): Likewise.
+	(complete_vars): Call cp_apply_type_quals_to_decl.
+	* typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
+	cases where that's not valid.
+
+	PR c++/19991
+	* init.c (integral_constant_value): Iterate if the value of a decl
+	is itself a constant.
+
+	PR c++/20152
+	* parser.c (cp_parser_class_head): Check for redefintions here.
+	* semantics.c (begin_class_definition): Not here.
+	
+	PR c++/20153
+	* decl2.c (build_anon_union_vars): Add type parameter.
+	(finish_anon_union): Pass it.
+
+	PR c++/20148
+	* error.c (dump_expr): Do not print the body of a BIND_EXPR.
+	Handle STATEMENT_LIST.
+
 	PR c++/19883
 	* parser.c (cp_parser_direct_declarator): Always complain about
 	non-constant array bounds when in a function scope.

I am friendly script caring about memory consumption in GCC.  Please contact
jh@suse.cz if something is going wrong.

The results can be reproduced by building 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.

Yours testing script.


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