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: 17820k
    Peak memory use before GGC: 9294k
    Peak memory use after GGC: 8606k
    Maximum of released memory in single GGC run: 2867k
    Garbage: 42475k
    Leak: 6107k
    Overhead: 5590k
    GGC runs: 363

comparing combine.c compilation at -O1 level:
    Overall memory needed: 18540k
    Peak memory use before GGC: 9573k
    Peak memory use after GGC: 8663k
    Maximum of released memory in single GGC run: 2067k
    Garbage: 78747k
    Leak: 6483k
    Overhead: 13868k
    GGC runs: 589

comparing combine.c compilation at -O2 level:
    Overall memory needed: 22076k
    Peak memory use before GGC: 12756k
    Peak memory use after GGC: 12610k
    Maximum of released memory in single GGC run: 2576k
    Garbage: 94713k
    Leak: 6304k
    Overhead: 18777k
    GGC runs: 580

comparing combine.c compilation at -O3 level:
    Overall memory needed: 23972k
    Peak memory use before GGC: 13246k
    Peak memory use after GGC: 12610k
    Maximum of released memory in single GGC run: 3483k
    Garbage: 126026k
    Leak: 6852k
    Overhead: 24652k
    GGC runs: 646

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 132860k
    Peak memory use before GGC: 76388k
    Peak memory use after GGC: 45185k
    Maximum of released memory in single GGC run: 41417k
    Garbage: 157790k
    Leak: 10620k
    Overhead: 19800k
    GGC runs: 310

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 151600k
    Peak memory use before GGC: 94307k
    Peak memory use after GGC: 71401k
    Maximum of released memory in single GGC run: 40513k
    Garbage: 474239k
    Leak: 10968k
    Overhead: 84931k
    GGC runs: 461

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 237408k
    Peak memory use before GGC: 109880k
    Peak memory use after GGC: 86974k
    Maximum of released memory in single GGC run: 35488k
    Garbage: 525180k
    Leak: 11150k
    Overhead: 95096k
    GGC runs: 383

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 237384k
    Peak memory use before GGC: 109882k
    Peak memory use after GGC: 86975k
    Maximum of released memory in single GGC run: 35488k
    Garbage: 527525k
    Leak: 11223k
    Overhead: 95873k
    GGC runs: 392

comparing Gerald's testcase PR8361 compilation at -O0 level:
  Overall memory allocated via mmap and sbrk increased from 113132k to 114844k, overall 1.51%
  Peak amount of GGC memory allocated before garbage collecting increased from 90409k to 92008k, overall 1.77%
  Peak amount of GGC memory still allocated after garbage collectin increased from 88883k to 90475k, overall 1.79%
  Amount of produced GGC garbage increased from 267696k to 270774k, overall 1.15%
  Amount of memory still referenced at the end of compilation increased from 57972k to 58324k, overall 0.61%
    Overall memory needed: 113132k -> 114844k
    Peak memory use before GGC: 90409k -> 92008k
    Peak memory use after GGC: 88883k -> 90475k
    Maximum of released memory in single GGC run: 20325k -> 20896k
    Garbage: 267696k -> 270774k
    Leak: 57972k -> 58324k
    Overhead: 34596k -> 34949k
    GGC runs: 553 -> 552

comparing Gerald's testcase PR8361 compilation at -O1 level:
  Overall memory allocated via mmap and sbrk increased from 115408k to 120284k, overall 4.23%
  Peak amount of GGC memory allocated before garbage collecting increased from 88921k to 96217k, overall 8.21%
  Peak amount of GGC memory still allocated after garbage collectin increased from 88039k to 89741k, overall 1.93%
  Amount of memory still referenced at the end of compilation increased from 60153k to 60665k, overall 0.85%
    Overall memory needed: 115408k -> 120284k
    Peak memory use before GGC: 88921k -> 96217k
    Peak memory use after GGC: 88039k -> 89741k
    Maximum of released memory in single GGC run: 19486k -> 20047k
    Garbage: 671734k -> 672246k
    Leak: 60153k -> 60665k
    Overhead: 144644k -> 145158k
    GGC runs: 841 -> 835

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 116812k to 121448k, overall 3.97%
  Peak amount of GGC memory allocated before garbage collecting increased from 88922k to 96218k, overall 8.20%
  Peak amount of GGC memory still allocated after garbage collectin increased from 88039k to 89741k, overall 1.93%
  Amount of memory still referenced at the end of compilation increased from 60762k to 61246k, overall 0.80%
    Overall memory needed: 116812k -> 121448k
    Peak memory use before GGC: 88922k -> 96218k
    Peak memory use after GGC: 88039k -> 89741k
    Maximum of released memory in single GGC run: 19487k -> 20048k
    Garbage: 726419k -> 726805k
    Leak: 60762k -> 61246k
    Overhead: 166904k -> 167636k
    GGC runs: 876 -> 870

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 119032k to 120080k, overall 0.88%
  Peak amount of GGC memory allocated before garbage collecting increased from 90120k to 92007k, overall 2.09%
  Peak amount of GGC memory still allocated after garbage collectin increased from 89108k to 90540k, overall 1.61%
  Amount of memory still referenced at the end of compilation increased from 61369k to 61633k, overall 0.43%
    Overall memory needed: 119032k -> 120080k
    Peak memory use before GGC: 90120k -> 92007k
    Peak memory use after GGC: 89108k -> 90540k
    Maximum of released memory in single GGC run: 19982k -> 20814k
    Garbage: 770533k -> 766821k
    Leak: 61369k -> 61633k
    Overhead: 181353k -> 180906k
    GGC runs: 866 -> 851

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-09-12 20:28:04.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-09-12 21:43:27.000000000 +0000
@@ -1,3 +1,9 @@
+2004-09-12  Richard Henderson  <rth@redhat.com>
+
+	PR c++/16254
+	* fold-const.c (fold) <case CLEANUP_POINT_EXPR>: Remove.
+	* tree.c, tree.h (has_cleanups): Remove.
+
 2004-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
 	* tree-ssa-loop-manip.c (split_loop_exit_edge): Handle non-ssaname
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2004-09-12 07:16:19.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2004-09-12 21:43:28.000000000 +0000
@@ -1,3 +1,9 @@
+2004-09-12  Richard Henderson  <rth@redhat.com>
+
+	PR c++/16254
+	* semantics.c (maybe_cleanup_point_expr): Don't call fold.
+	* typeck.c (condition_conversion): Likewise.
+
 2004-09-11  Richard Henderson  <rth@redhat.com>
 
 	PR c++/17404

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]