GCC memory consumption increased by recent patch!

gcctest@suse.de gcctest@suse.de
Sun Sep 26 04:15: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: 24117k
    Peak memory use before GGC: 9296k
    Peak memory use after GGC: 8607k
    Maximum of released memory in single GGC run: 2870k
    Garbage: 42629k
    Leak: 6090k
    Overhead: 5588k
    GGC runs: 363

comparing combine.c compilation at -O1 level:
  Amount of produced GGC garbage increased from 68664k to 69012k, overall 0.51%
    Overall memory needed: 25565k -> 25585k
    Peak memory use before GGC: 9376k -> 9377k
    Peak memory use after GGC: 8798k -> 8800k
    Maximum of released memory in single GGC run: 2031k
    Garbage: 68664k -> 69012k
    Leak: 6669k -> 6674k
    Overhead: 11043k -> 11060k
    GGC runs: 575

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 83780k to 84129k, overall 0.42%
    Overall memory needed: 28881k -> 28901k
    Peak memory use before GGC: 12772k
    Peak memory use after GGC: 12613k
    Maximum of released memory in single GGC run: 2525k
    Garbage: 83780k -> 84129k
    Leak: 6427k -> 6428k
    Overhead: 15590k -> 15609k
    GGC runs: 571

comparing combine.c compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 20488k to 20544k, overall 0.27%
  Peak amount of GGC memory allocated before garbage collecting increased from 13014k to 13044k, overall 0.23%
  Amount of produced GGC garbage increased from 111539k to 112018k, overall 0.43%
    Overall memory needed: 20488k -> 20544k
    Peak memory use before GGC: 13014k -> 13044k
    Peak memory use after GGC: 12690k -> 12692k
    Maximum of released memory in single GGC run: 3362k
    Garbage: 111539k -> 112018k
    Leak: 6912k -> 6913k
    Overhead: 20628k -> 20652k
    GGC runs: 637

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 116476k
    Peak memory use before GGC: 77101k
    Peak memory use after GGC: 45186k
    Maximum of released memory in single GGC run: 42129k
    Garbage: 159505k
    Leak: 10645k
    Overhead: 19805k
    GGC runs: 310

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 133128k
    Peak memory use before GGC: 93162k
    Peak memory use after GGC: 71529k
    Maximum of released memory in single GGC run: 41234k
    Garbage: 452513k -> 452514k
    Leak: 11078k
    Overhead: 73596k -> 73596k
    GGC runs: 461

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 207744k
    Peak memory use before GGC: 108725k
    Peak memory use after GGC: 87092k
    Maximum of released memory in single GGC run: 34490k
    Garbage: 502006k -> 502029k
    Leak: 11218k
    Overhead: 82989k -> 82991k
    GGC runs: 383 -> 384

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 207736k
    Peak memory use before GGC: 108726k
    Peak memory use after GGC: 87093k
    Maximum of released memory in single GGC run: 34491k
    Garbage: 503113k -> 503198k
    Leak: 11256k
    Overhead: 83381k -> 83387k
    GGC runs: 392 -> 393

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 115352k
    Peak memory use before GGC: 92231k
    Peak memory use after GGC: 90025k
    Maximum of released memory in single GGC run: 20139k
    Garbage: 265688k
    Leak: 60277k
    Overhead: 47198k
    GGC runs: 378

comparing Gerald's testcase PR8361 compilation at -O1 level:
  Amount of produced GGC garbage increased from 585606k to 594162k, overall 1.46%
    Overall memory needed: 109300k
    Peak memory use before GGC: 95751k
    Peak memory use after GGC: 88883k
    Maximum of released memory in single GGC run: 19570k
    Garbage: 585606k -> 594162k
    Leak: 62426k -> 62349k
    Overhead: 130831k -> 130957k
    GGC runs: 602 -> 605

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Amount of produced GGC garbage increased from 638517k to 646972k, overall 1.32%
    Overall memory needed: 110320k -> 110336k
    Peak memory use before GGC: 95751k
    Peak memory use after GGC: 88883k
    Maximum of released memory in single GGC run: 19569k
    Garbage: 638517k -> 646972k
    Leak: 62980k -> 62912k
    Overhead: 154095k -> 154222k
    GGC runs: 630 -> 637

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Peak amount of GGC memory allocated before garbage collecting increased from 91498k to 91613k, overall 0.13%
  Amount of produced GGC garbage increased from 669658k to 682382k, overall 1.90%
    Overall memory needed: 107968k -> 108020k
    Peak memory use before GGC: 91498k -> 91613k
    Peak memory use after GGC: 90197k
    Maximum of released memory in single GGC run: 20253k
    Garbage: 669658k -> 682382k
    Leak: 63385k -> 63341k
    Overhead: 163194k -> 163378k
    GGC runs: 623 -> 626

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-09-25 12:28:22.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-09-25 17:08:58.000000000 +0000
@@ -1,3 +1,30 @@
+2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-vectorizer.c: Fix a comment typo.
+
+2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* c-typeck.c, defaults.h, dwarf.h, dwarf2out.c, fold-const.c,
+	gthr-dce.h, gthr-posix.h, gthr-solaris.h, gthr-win32.h,
+	lambda-code.c, lambda-mat.c, libgcc2.c, stmt.c,
+	tree-ssa-pre.c, tree-vn.c, tree.h: Fix comment formatting.
+
+2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-ssa-loop-unswitch.c: Fix a comment typo.
+
+2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* doc/passes.texi: Fix a typo.
+
+2004-09-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+	* tree-optimize.c (init_tree_optimization_passes): Add
+	pass_record_bounds.
+	* tree-pass.h (pass_record_bounds): Declare.
+	* tree-ssa-loop.c (tree_ssa_loop_bounds, pass_record_bounds):
+	New pass.
+
 2004-09-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
 	PR tree-optimization/17474

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