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]

Some aspect of 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: 25329k
    Peak memory use before GGC: 9329k
    Peak memory use after GGC: 8641k
    Maximum of released memory in single GGC run: 2926k
    Garbage: 42601k
    Leak: 6088k -> 6087k
    Overhead: 5744k -> 5743k
    GGC runs: 354

comparing combine.c compilation at -O1 level:
    Overall memory needed: 25885k -> 25881k
    Peak memory use before GGC: 9201k
    Peak memory use after GGC: 8723k
    Maximum of released memory in single GGC run: 2063k
    Garbage: 68067k
    Leak: 6485k -> 6484k
    Overhead: 10672k -> 10671k
    GGC runs: 547

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29977k -> 30001k
    Peak memory use before GGC: 12705k
    Peak memory use after GGC: 12578k
    Maximum of released memory in single GGC run: 2575k
    Garbage: 82364k
    Leak: 6305k -> 6305k
    Overhead: 14873k -> 14872k
    GGC runs: 549

comparing combine.c compilation at -O3 level:
    Overall memory needed: 20764k
    Peak memory use before GGC: 12987k
    Peak memory use after GGC: 12578k
    Maximum of released memory in single GGC run: 3412k
    Garbage: 111191k
    Leak: 6833k -> 6832k
    Overhead: 19888k -> 19887k
    GGC runs: 615

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118468k
    Peak memory use before GGC: 79386k
    Peak memory use after GGC: 46137k
    Maximum of released memory in single GGC run: 43335k
    Garbage: 162034k
    Leak: 10610k -> 10609k
    Overhead: 21250k -> 21249k
    GGC runs: 295

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 132256k
    Peak memory use before GGC: 85238k
    Peak memory use after GGC: 70037k
    Maximum of released memory in single GGC run: 41132k
    Garbage: 449332k
    Leak: 10956k -> 10955k
    Overhead: 79598k -> 79597k
    GGC runs: 429

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 154184k
    Peak memory use before GGC: 101254k
    Peak memory use after GGC: 85454k
    Maximum of released memory in single GGC run: 42175k
    Garbage: 496336k
    Leak: 10884k -> 10883k
    Overhead: 87864k -> 87863k
    GGC runs: 363

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 154196k -> 154200k
    Peak memory use before GGC: 101255k
    Peak memory use after GGC: 85456k
    Maximum of released memory in single GGC run: 42175k
    Garbage: 497624k
    Leak: 10931k -> 10930k
    Overhead: 88052k -> 88052k
    GGC runs: 371

comparing Gerald's testcase PR8361 compilation at -O0 level:
  Overall memory allocated via mmap and sbrk increased from 113028k to 113252k, overall 0.20%
  Peak amount of GGC memory allocated before garbage collecting increased from 89585k to 89795k, overall 0.23%
  Peak amount of GGC memory still allocated after garbage collectin increased from 88693k to 88905k, overall 0.24%
  Amount of memory still referenced at the end of compilation increased from 57281k to 57666k, overall 0.67%
    Overall memory needed: 113028k -> 113252k
    Peak memory use before GGC: 89585k -> 89795k
    Peak memory use after GGC: 88693k -> 88905k
    Maximum of released memory in single GGC run: 19771k -> 19901k
    Garbage: 249003k -> 249005k
    Leak: 57281k -> 57666k
    Overhead: 45237k -> 45421k
    GGC runs: 361 -> 362

comparing Gerald's testcase PR8361 compilation at -O1 level:
  Overall memory allocated via mmap and sbrk increased from 95584k to 95796k, overall 0.22%
  Peak amount of GGC memory allocated before garbage collecting increased from 88601k to 88796k, overall 0.22%
  Peak amount of GGC memory still allocated after garbage collectin increased from 87616k to 87822k, overall 0.24%
  Amount of memory still referenced at the end of compilation increased from 59317k to 59700k, overall 0.65%
    Overall memory needed: 95584k -> 95796k
    Peak memory use before GGC: 88601k -> 88796k
    Peak memory use after GGC: 87616k -> 87822k
    Maximum of released memory in single GGC run: 19411k -> 19406k
    Garbage: 553651k -> 553627k
    Leak: 59317k -> 59700k
    Overhead: 115285k -> 115466k
    GGC runs: 611

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 95584k to 95796k, overall 0.22%
  Peak amount of GGC memory allocated before garbage collecting increased from 88602k to 88796k, overall 0.22%
  Peak amount of GGC memory still allocated after garbage collectin increased from 87617k to 87822k, overall 0.23%
  Amount of memory still referenced at the end of compilation increased from 59890k to 60281k, overall 0.65%
    Overall memory needed: 95584k -> 95796k
    Peak memory use before GGC: 88602k -> 88796k
    Peak memory use after GGC: 87617k -> 87822k
    Maximum of released memory in single GGC run: 19411k -> 19405k
    Garbage: 602729k -> 602694k
    Leak: 59890k -> 60281k
    Overhead: 137455k -> 137635k
    GGC runs: 655

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Ovarall memory allocated via mmap and sbrk decreased from 103248k to 98380k, overall -4.95%
  Peak amount of GGC memory allocated before garbage collecting run decreased from 95700k to 90197k, overall -6.10%
  Amount of memory still referenced at the end of compilation increased from 60230k to 60622k, overall 0.65%
    Overall memory needed: 103248k -> 98380k
    Peak memory use before GGC: 95700k -> 90197k
    Peak memory use after GGC: 88917k -> 88649k
    Maximum of released memory in single GGC run: 20229k -> 20099k
    Garbage: 642727k -> 642690k
    Leak: 60230k -> 60622k
    Overhead: 148752k -> 148933k
    GGC runs: 650 -> 647

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-12-07 01:38:41.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-12-07 10:42:33.000000000 +0000
@@ -1,3 +1,7 @@
+2004-12-06  Ziemowit Laski  <zlaski@apple.com>
+
+	* c-tree.h (struct lang_type): Add 'objc_protocols' field.
+
 2004-12-06  DJ Delorie  <dj@redhat.com>
 
 	* reload.c (find_valid_class): Fix logic to test inner mode as well.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2004-12-04 14:50:35.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2004-12-07 10:42:36.000000000 +0000
@@ -1,3 +1,7 @@
+2004-12-06  Ziemowit Laski  <zlaski@apple.com>
+
+	* cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
+
 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
 	PR c++/17011, c++/17971

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]