Some aspect of GCC memory consumption increased by recent patch

gcctest@suse.de gcctest@suse.de
Tue Nov 2 09:57:00 GMT 2004


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: 25229k -> 25233k
    Peak memory use before GGC: 9329k
    Peak memory use after GGC: 8641k
    Maximum of released memory in single GGC run: 2926k
    Garbage: 42520k
    Leak: 6088k
    Overhead: 5657k
    GGC runs: 354

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26545k -> 26485k
    Peak memory use before GGC: 9256k -> 9205k
    Peak memory use after GGC: 8733k
    Maximum of released memory in single GGC run: 2067k -> 2066k
    Garbage: 70551k -> 69776k
    Leak: 6484k -> 6484k
    Overhead: 11476k -> 11360k
    GGC runs: 563 -> 554

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29833k -> 29821k
    Peak memory use before GGC: 12705k
    Peak memory use after GGC: 12579k
    Maximum of released memory in single GGC run: 2579k -> 2576k
    Garbage: 86002k -> 84782k
    Leak: 6305k -> 6303k
    Overhead: 16184k -> 15985k
    GGC runs: 567 -> 562

comparing combine.c compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 21348k to 21384k, overall 0.17%
  Amount of memory still referenced at the end of compilation increased from 6829k to 6845k, overall 0.23%
    Overall memory needed: 21348k -> 21384k
    Peak memory use before GGC: 13091k -> 13093k
    Peak memory use after GGC: 12579k
    Maximum of released memory in single GGC run: 3420k -> 3413k
    Garbage: 115219k -> 113752k
    Leak: 6829k -> 6845k
    Overhead: 21279k -> 21057k
    GGC runs: 632 -> 629

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118512k
    Peak memory use before GGC: 79408k
    Peak memory use after GGC: 46137k
    Maximum of released memory in single GGC run: 43357k
    Garbage: 161090k
    Leak: 10609k
    Overhead: 20460k
    GGC runs: 295

comparing insn-attrtab.c compilation at -O1 level:
  Ovarall memory allocated via mmap and sbrk decreased from 130240k to 125048k, overall -4.15%
  Amount of produced GGC garbage decreased from 445811k to 430923k, overall -3.45%
    Overall memory needed: 130240k -> 125048k
    Peak memory use before GGC: 86893k -> 86894k
    Peak memory use after GGC: 70491k
    Maximum of released memory in single GGC run: 40959k -> 41161k
    Garbage: 445811k -> 430923k
    Leak: 10954k -> 10956k
    Overhead: 75545k -> 80011k
    GGC runs: 451 -> 441

comparing insn-attrtab.c compilation at -O2 level:
  Ovarall memory allocated via mmap and sbrk decreased from 205748k to 151484k, overall -35.82%
  Amount of produced GGC garbage decreased from 495175k to 477318k, overall -3.74%
    Overall memory needed: 205748k -> 151484k
    Peak memory use before GGC: 102310k
    Peak memory use after GGC: 85907k
    Maximum of released memory in single GGC run: 35657k -> 42321k
    Garbage: 495175k -> 477318k
    Leak: 10882k -> 10883k
    Overhead: 83644k -> 88016k
    GGC runs: 373 -> 362

comparing insn-attrtab.c compilation at -O3 level:
  Ovarall memory allocated via mmap and sbrk decreased from 205748k to 151488k, overall -35.82%
  Amount of produced GGC garbage decreased from 496448k to 478591k, overall -3.73%
    Overall memory needed: 205748k -> 151488k
    Peak memory use before GGC: 102312k
    Peak memory use after GGC: 85909k
    Maximum of released memory in single GGC run: 35657k -> 42322k
    Garbage: 496448k -> 478591k
    Leak: 10926k -> 10927k
    Overhead: 83828k -> 88206k
    GGC runs: 382 -> 371

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 112784k
    Peak memory use before GGC: 89431k
    Peak memory use after GGC: 88443k
    Maximum of released memory in single GGC run: 19812k
    Garbage: 250197k
    Leak: 57105k
    Overhead: 45842k
    GGC runs: 363

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 95348k
    Peak memory use before GGC: 88431k
    Peak memory use after GGC: 87373k
    Maximum of released memory in single GGC run: 19437k
    Garbage: 596055k -> 595661k
    Leak: 59145k
    Overhead: 133338k -> 133281k
    GGC runs: 630 -> 628

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 95724k -> 95720k
    Peak memory use before GGC: 88431k
    Peak memory use after GGC: 87373k
    Maximum of released memory in single GGC run: 19437k
    Garbage: 652310k -> 651588k
    Leak: 59736k -> 59735k
    Overhead: 158340k -> 158233k
    GGC runs: 675

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 103024k to 103192k, overall 0.16%
    Overall memory needed: 103024k -> 103192k
    Peak memory use before GGC: 95610k
    Peak memory use after GGC: 88661k
    Maximum of released memory in single GGC run: 20248k
    Garbage: 700339k -> 699705k
    Leak: 60123k -> 60123k
    Overhead: 172124k -> 172018k
    GGC runs: 663 -> 664

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-11-01 23:36:51.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-11-02 05:02:58.000000000 +0000
@@ -1,3 +1,40 @@
+2004-11-02  Danny Smith  <dannysmith@users.sourceforge.net>
+
+	PR debug/18242
+	* toplev.c (debug_type_names): Remove "dwarf-1".
+
+2004-11-02  Ben Elliston  <bje@au.ibm.com>
+
+	* timevar.h (timevar_get): Remove. 
+	* timevar.c (timevar_get): Remove unused function.
+
+2004-11-02  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* doc/include/texinfo.tex: Update from Texinfo CVS.
+
+2004-11-02  Ben Elliston  <bje@au.ibm.com>
+
+	* cppdefault.h (cpp_SYSROOT): Remove.
+	* cppdefault.c (cpp_SYSROOT): Likewise.
+
+2004-11-01  Andrew MacLeod  <amacleod@redhat.com>
+
+	PR tree-optimization/16447
+	* tree-cfg.c (bsi_commit_one_edge_insert): Rename from 
+	bsi_commit_edge_inserts_1, and make funtion external.  Return new block.
+	(bsi_commit_edge_inserts): Use renamed bsi_commit_one_edge_insert.
+	* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Enable listing.
+	* tree-flow.h (bsi_commit_one_edge_insert): Extern decl.
+	* tree-outof-ssa.c (rewrite_trees): Don't commit edges here.
+	(same_stmt_list_p): New.  Return TRUE if edge is to be forwarded.
+	(identical_copies_p): New.  Return true is two copies are the same.
+	(identical_stmt_lists_p): New.  Return true if stmt lists are the same.
+	(analyze_edges_for_bb): New.  Determine how best to insert edge stmts 
+	for a basic block.
+	(perform_edge_inserts): New.  Determine what to do with all stmts that
+	have been inserted on edges.
+	(remove_ssa_form):  Analyze and commit edges from here.
+
 2004-11-01  Andrew Pinski  <pinskia@physics.uc.edu>
 
 	PR bootstrap/18232

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.



More information about the Gcc-regression mailing list