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]

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: 25245k -> 25233k
    Peak memory use before GGC: 9345k -> 9337k
    Peak memory use after GGC: 8656k -> 8648k
    Maximum of released memory in single GGC run: 2939k -> 2931k
    Garbage: 43112k -> 42989k
    Leak: 6090k
    Overhead: 5691k -> 5653k
    GGC runs: 363

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26701k -> 26705k
    Peak memory use before GGC: 9436k
    Peak memory use after GGC: 8872k
    Maximum of released memory in single GGC run: 2071k -> 2063k
    Garbage: 73084k -> 72984k
    Leak: 6677k
    Overhead: 11485k -> 11462k
    GGC runs: 576

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29817k -> 29829k
    Peak memory use before GGC: 12772k
    Peak memory use after GGC: 12612k
    Maximum of released memory in single GGC run: 2596k -> 2580k
    Garbage: 88266k -> 88167k
    Leak: 6431k
    Overhead: 16029k -> 16004k
    GGC runs: 578

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 7000k to 7016k, overall 0.23%
    Overall memory needed: 21480k -> 21408k
    Peak memory use before GGC: 13436k
    Peak memory use after GGC: 12722k
    Maximum of released memory in single GGC run: 3454k -> 3438k
    Garbage: 118669k -> 118522k
    Leak: 7000k -> 7016k
    Overhead: 21231k -> 21198k
    GGC runs: 643 -> 644

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118768k -> 118640k
    Peak memory use before GGC: 79664k -> 79536k
    Peak memory use after GGC: 46309k -> 46181k
    Maximum of released memory in single GGC run: 43569k -> 43441k
    Garbage: 163566k -> 163178k
    Leak: 10644k
    Overhead: 20606k -> 20458k
    GGC runs: 307

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 129756k
    Peak memory use before GGC: 90827k
    Peak memory use after GGC: 70898k
    Maximum of released memory in single GGC run: 42067k -> 42003k
    Garbage: 461322k -> 461097k
    Leak: 11075k
    Overhead: 74572k -> 74488k
    GGC runs: 460

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 209916k -> 209852k
    Peak memory use before GGC: 105788k
    Peak memory use after GGC: 86457k
    Maximum of released memory in single GGC run: 35975k -> 35911k
    Garbage: 510723k -> 510494k
    Leak: 10957k
    Overhead: 82616k -> 82528k
    GGC runs: 384

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 209916k -> 209852k
    Peak memory use before GGC: 105797k -> 105793k
    Peak memory use after GGC: 86466k -> 86462k
    Maximum of released memory in single GGC run: 35975k -> 35911k
    Garbage: 512100k -> 511893k
    Leak: 11011k -> 11003k
    Overhead: 82804k -> 82717k
    GGC runs: 393

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111880k
    Peak memory use before GGC: 88782k
    Peak memory use after GGC: 87659k
    Maximum of released memory in single GGC run: 19632k
    Garbage: 254537k -> 254397k
    Leak: 58629k -> 58629k
    Overhead: 46773k -> 46754k
    GGC runs: 368 -> 367

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 100900k -> 100856k
    Peak memory use before GGC: 87765k
    Peak memory use after GGC: 86614k
    Maximum of released memory in single GGC run: 19240k
    Garbage: 693460k -> 693423k
    Leak: 60727k
    Overhead: 130773k -> 130761k
    GGC runs: 625

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 101868k -> 101924k
    Peak memory use before GGC: 87766k
    Peak memory use after GGC: 86614k
    Maximum of released memory in single GGC run: 19240k
    Garbage: 744924k -> 744876k
    Leak: 61274k
    Overhead: 154253k -> 154235k
    GGC runs: 655 -> 656

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 118620k -> 118624k
    Peak memory use before GGC: 100329k
    Peak memory use after GGC: 89195k
    Maximum of released memory in single GGC run: 19988k
    Garbage: 850837k -> 850766k
    Leak: 61768k
    Overhead: 166014k -> 166000k
    GGC runs: 643

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-10-11 12:42:54.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-10-11 20:44:09.000000000 +0000
@@ -1,3 +1,59 @@
+2004-10-11  Andrew Pinski  <pinskia@physics.uc.edu
+
+	PR middle-end/16266
+	* function.c (temp_slots_at_level): Fix typo which creates too
+	many temp stack slots levels.
+
+2004-10-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* config/s390/s390.c (s390_trampoline_template): Generate shorter
+	trampoline code.
+	(s390_trampoline_instantiate): Adapt.
+	* config/s390/s390.h (TRAMPOLINE_SIZE): Adapt to new code.
+
+2004-10-11  Roger Sayle  <roger@eyesopen.com>
+
+	PR middle-end/17657
+	* stmt.c (add_case_node): Add additional type argument.  Declare
+	as static to match prototype.  Convert the upper and lower bounds
+	to the specified index type.  Optimize away case ranges/values 
+	that are outside the index type's bounds.  Truncate case ranges
+	that span the index type's bounds.
+	(expand_case): Avoid unnessary computation and memory allocation
+	when index type is error_mark_node.  Pass index_type as required
+	by change to add_case_node API.  No need to convert case range
+	bounds to index_type, this is now done by add_case_node.
+
+2004-10-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* config/s390/s390-protos.h (s390_offset_p): Add prototype.
+	* config/s390/s390.c (s390_offset_p): New function.
+	* config/s390/s390.md ("*cmpdi_cct", "*cmpsi_cct", "*cmpdi_ccu",
+	"*cmpsi_ccu", "*cmphi_ccu", "*cmpqi_ccu"): Use splitter to
+	transform Q->Q alternatives to *clc pattern.
+	("*clc"): Move.
+	("movti", "*movdi_64", "*movdi_31", "*movsi_zarch", "*movsi_esa",
+	"*movhi", "*movqi", "*movdf_64", "*movdf_31", "movsf"): Use splitter
+	to transform Q->Q alternatives to *mvc pattern.
+	("*mvc"): Move.  Add peephole to merge adjacent MVCs.
+	("*anddi3", "*andsi3_zarch", "*andsi3_esa", "*andhi3_zarch",
+	"*andhi3_esa", "*andqi3_zarch", "*andqi3_esa"): Use splitter to
+	transform Q->Q alternatives to *nc pattern.
+	("*nc"): New insn.  New peephole to merge adjacent NCs.
+	("*iordi3", "*iorsi3_zarch", "*iorsi3_esa", "*iorhi3_zarch",
+	"*iorhi3_esa", "*iorqi3_zarch", "*iorqi3_esa"): Use splitter to
+	transform Q->Q alternatives to *oc pattern.
+	("*oc"): New insn.  New peephole to merge adjacent OCs.
+	("*xordi3", "*xorsi3", "*xorhi3", "*xorqi3"): Use splitter to
+	transform Q->Q alternatives to *xc pattern.
+	("*xc"): New insn.  New peephole to merge adjacent XCs.
+	("*xc_zero"): Move.  Add peephole to merge adjacent XCs.
+
+2004-10-11  Andrew Pinski  <pinskia@physics.uc.edu>
+
+	* gimplify.c (gimple_push_condition): Make sure that we don't
+	have any saved condition cleanup if we were at the top level.
+
 2004-10-11  Richard Sandiford  <rsandifo@redhat.com>
 
 	* config/frv/frv.md (*adddi3_internal): Change name to...
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2004-10-11 12:42:56.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2004-10-11 20:44:09.000000000 +0000
@@ -1,3 +1,38 @@
+2004-10-11  Mark Mitchell  <mark@codesourcery.com>
+
+	PR c++/17929
+	* decl2.c (finish_anon_union): Robustify.
+
+2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* cp-tree.h (get_dynamic_cast_base_type): Rename to ...
+	(dcast_base_hint): ... here.
+	* rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
+	* search.c (struct dcast_data_s): New.
+	(dynamic_cast_base_recurse): Remove. Replace with ...
+	(dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
+	(get_dynamic_cast_base_type): Rename to ...
+	(dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
+	(accessible_r): Remove.
+	(dfs_accessible_post): New, broken out of accessible_r.
+	(accessible_p): Use dfs_walk_once_accessible.
+	(dfs_walk_once_accessible_r): New. From accessible_r.
+	(dfs_walk_once_accessible): New. From acessible_p.
+
+	* cp-tree.h (SAME_BINFO_TYPE_P): New.
+	* class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
+	binfo types.
+	(convert_to_base_statically, determine_primary_bases,
+	update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
+	dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
+	accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
+	build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
+	* init.c (expand_member_init): Likewise.
+	* search.c (lookup_base_r, dynamic_cast_base_recurse,
+	binfo_via_virtual, copied_binfo, binfo_for_vbase,
+	original_binfo): Likewise.
+	* tree.c (copy_binfo): Likewise.
+
 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* semantics.c: Fix comment typos.

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]