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 combine.c compilation at -O0 level:
    Overall memory needed: 24905k -> 24913k
    Peak memory use before GGC: 9595k -> 9596k
    Peak memory use after GGC: 8942k -> 8943k
    Maximum of released memory in single GGC run: 2737k
    Garbage: 40107k -> 40116k
    Leak: 6705k -> 6706k
    Overhead: 5789k -> 5789k
    GGC runs: 317

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26820k
    Peak memory use before GGC: 17364k -> 17365k
    Peak memory use after GGC: 17180k -> 17181k
    Maximum of released memory in single GGC run: 2372k
    Garbage: 60649k -> 60640k
    Leak: 6888k -> 6889k
    Overhead: 7579k -> 7579k
    GGC runs: 387

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26820k
    Peak memory use before GGC: 17367k -> 17368k
    Peak memory use after GGC: 17180k -> 17181k
    Maximum of released memory in single GGC run: 2452k
    Garbage: 77425k -> 77405k
    Leak: 6973k -> 6974k
    Overhead: 10026k -> 10022k
    GGC runs: 457 -> 456

comparing combine.c compilation at -O3 level:
    Overall memory needed: 26820k
    Peak memory use before GGC: 18365k -> 18366k
    Peak memory use after GGC: 17995k -> 17996k
    Maximum of released memory in single GGC run: 3510k
    Garbage: 107811k -> 107818k
    Leak: 7045k -> 7047k
    Overhead: 13564k -> 13564k
    GGC runs: 509

comparing insn-attrtab.c compilation at -O0 level:
  Amount of memory still referenced at the end of compilation increased from 9842k to 10097k, overall 2.59%
    Overall memory needed: 80924k
    Peak memory use before GGC: 69469k -> 69470k
    Peak memory use after GGC: 45007k -> 45008k
    Maximum of released memory in single GGC run: 36247k
    Garbage: 146683k -> 146427k
    Leak: 9842k -> 10097k
    Overhead: 19796k -> 19796k
    GGC runs: 252 -> 251

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 111716k
    Peak memory use before GGC: 94039k -> 94040k
    Peak memory use after GGC: 83556k -> 83557k
    Maximum of released memory in single GGC run: 32588k
    Garbage: 289912k -> 289912k
    Leak: 10075k -> 10076k
    Overhead: 36685k -> 36685k
    GGC runs: 245 -> 244

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 127152k -> 127156k
    Peak memory use before GGC: 113349k -> 113350k
    Peak memory use after GGC: 83468k -> 83469k
    Maximum of released memory in single GGC run: 32177k
    Garbage: 372250k -> 372247k
    Leak: 10176k -> 10177k
    Overhead: 48202k -> 48202k
    GGC runs: 274 -> 273

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 127204k
    Peak memory use before GGC: 113377k -> 113382k
    Peak memory use after GGC: 83494k -> 83499k
    Maximum of released memory in single GGC run: 32501k
    Garbage: 372854k -> 372830k
    Leak: 10180k -> 10181k
    Overhead: 48353k -> 48353k
    GGC runs: 277 -> 275

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118384k -> 118388k
    Peak memory use before GGC: 95138k -> 95139k
    Peak memory use after GGC: 94190k -> 94191k
    Maximum of released memory in single GGC run: 20460k
    Garbage: 223580k -> 223580k
    Leak: 49194k -> 49196k
    Overhead: 36729k -> 36730k
    GGC runs: 370

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 106008k -> 106016k
    Peak memory use before GGC: 95267k -> 95268k
    Peak memory use after GGC: 93193k -> 93194k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 567712k -> 567713k
    Leak: 55015k -> 55016k
    Overhead: 67667k -> 67668k
    GGC runs: 518

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106360k -> 106324k
    Peak memory use before GGC: 95268k -> 95269k
    Peak memory use after GGC: 93193k -> 93194k
    Maximum of released memory in single GGC run: 20344k
    Garbage: 654031k -> 654026k
    Leak: 55791k -> 55808k
    Overhead: 79256k -> 79256k
    GGC runs: 585

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 108840k -> 108808k
    Peak memory use before GGC: 96736k -> 96737k
    Peak memory use after GGC: 94271k -> 94272k
    Maximum of released memory in single GGC run: 20840k
    Garbage: 708868k -> 708886k
    Leak: 56977k -> 56982k
    Overhead: 84272k -> 84271k
    GGC runs: 598 -> 597

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-11-20 11:41:11.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-11-21 01:04:49.000000000 +0000
@@ -1,3 +1,31 @@
+2005-11-20  Richard Henderson  <rth@redhat.com>
+
+	PR 24931
+	* tree-sra.c (struct sra_elt): Add all_no_warning.
+	(struct sra_walk_fns) <use>: Add use_all argument.
+	(sra_walk_expr): Pass it.
+	(sra_walk_modify_expr): Likewise.
+	(scalarize_ldst): Likewise.
+	(scan_use): Update for new argument.
+	(mark_no_warning): New.
+	(scalarize_use): Use it.
+
+2005-11-20  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* expr.c (expand_expr_real): Use usmul_optab for widening
+	signed * unsigned multiplies.
+	* genopinit.c (optabs): Add usmul_widen_optab.
+	* optabs.c (init_optabs): Likewise.
+	* optabs.h (enum optab_index): Add OTI_usmul_widen.
+	(usmul_widen_optab): Define.
+	* config/bfin/bfin.md (usmulhisi3): New pattern.
+
+	* doc/md.texi (usmulqihi3, usmulhisi3, usmulsidi3): Document.
+
+2005-11-20  Graham Stott <btinternet.com>
+
+	* gensupport.c (std_preds): Fixed extraneous `false` in last change.
+
 2005-11-20  Andreas Schwab  <schwab@suse.de>
 
 	PR target/24757


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]