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 decreased 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: 24765k
    Peak memory use before GGC: 8930k
    Peak memory use after GGC: 8565k
    Maximum of released memory in single GGC run: 2576k
    Garbage: 35002k
    Leak: 6058k
    Overhead: 4736k
    GGC runs: 296

comparing combine.c compilation at -O1 level:
    Overall memory needed: 36197k
    Peak memory use before GGC: 17003k
    Peak memory use after GGC: 16831k
    Maximum of released memory in single GGC run: 2265k
    Garbage: 54886k
    Leak: 6069k
    Overhead: 5754k
    GGC runs: 372

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26500k
    Peak memory use before GGC: 17000k
    Peak memory use after GGC: 16831k
    Maximum of released memory in single GGC run: 2254k
    Garbage: 78546k
    Leak: 6173k
    Overhead: 8279k
    GGC runs: 440

comparing combine.c compilation at -O3 level:
    Overall memory needed: 25596k
    Peak memory use before GGC: 18101k
    Peak memory use after GGC: 17437k
    Maximum of released memory in single GGC run: 3330k
    Garbage: 107587k
    Leak: 6253k
    Overhead: 11425k
    GGC runs: 486

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 83700k
    Peak memory use before GGC: 68249k
    Peak memory use after GGC: 43997k
    Maximum of released memory in single GGC run: 35709k
    Garbage: 126252k
    Leak: 9118k
    Overhead: 16889k
    GGC runs: 230

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 103608k
    Peak memory use before GGC: 83524k
    Peak memory use after GGC: 77617k
    Maximum of released memory in single GGC run: 31805k
    Garbage: 259523k
    Leak: 8930k
    Overhead: 28453k
    GGC runs: 232

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 105708k
    Peak memory use before GGC: 87821k
    Peak memory use after GGC: 79916k
    Maximum of released memory in single GGC run: 30384k
    Garbage: 305998k
    Leak: 8935k
    Overhead: 35479k
    GGC runs: 257

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 105392k
    Peak memory use before GGC: 87847k
    Peak memory use after GGC: 79943k
    Maximum of released memory in single GGC run: 30571k
    Garbage: 306588k
    Leak: 8938k
    Overhead: 35656k
    GGC runs: 261

comparing Gerald's testcase PR8361 compilation at -O0 level:
  Amount of produced GGC garbage decreased from 207055k to 199934k, overall -3.56%
    Overall memory needed: 116752k -> 116276k
    Peak memory use before GGC: 92902k -> 92434k
    Peak memory use after GGC: 91979k -> 91513k
    Maximum of released memory in single GGC run: 19765k -> 19648k
    Garbage: 207055k -> 199934k
    Leak: 47214k -> 47213k
    Overhead: 20860k -> 20482k
    GGC runs: 407 -> 398

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 115664k -> 115244k
    Peak memory use before GGC: 97382k -> 97008k
    Peak memory use after GGC: 95177k -> 94816k
    Maximum of released memory in single GGC run: 18543k -> 18293k
    Garbage: 444554k -> 436510k
    Leak: 49127k -> 49029k
    Overhead: 31611k -> 31258k
    GGC runs: 557 -> 551

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 115652k -> 115276k
    Peak memory use before GGC: 97381k -> 97009k
    Peak memory use after GGC: 95176k -> 94817k
    Maximum of released memory in single GGC run: 18543k -> 18292k
    Garbage: 530018k -> 522447k
    Leak: 49840k -> 49743k
    Overhead: 39521k -> 39342k
    GGC runs: 634 -> 627

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 116992k -> 116616k
    Peak memory use before GGC: 98824k -> 98446k
    Peak memory use after GGC: 96457k -> 96093k
    Maximum of released memory in single GGC run: 18861k -> 18613k
    Garbage: 550635k -> 541435k
    Leak: 50134k -> 49722k
    Overhead: 40666k -> 40183k
    GGC runs: 652 -> 638

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 134136k
    Peak memory use before GGC: 81628k
    Peak memory use after GGC: 58507k
    Maximum of released memory in single GGC run: 45493k
    Garbage: 143524k
    Leak: 7142k
    Overhead: 25104k
    GGC runs: 87

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 426132k
    Peak memory use before GGC: 201177k
    Peak memory use after GGC: 196173k
    Maximum of released memory in single GGC run: 95153k
    Garbage: 272370k
    Leak: 47195k
    Overhead: 30026k
    GGC runs: 105

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 344700k
    Peak memory use before GGC: 208293k
    Peak memory use after GGC: 196536k
    Maximum of released memory in single GGC run: 96535k
    Garbage: 388087k
    Leak: 47779k
    Overhead: 47627k
    GGC runs: 111

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 536244k
    Peak memory use before GGC: 314603k
    Peak memory use after GGC: 292947k
    Maximum of released memory in single GGC run: 163427k
    Garbage: 487440k
    Leak: 65111k
    Overhead: 58883k
    GGC runs: 100

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2006-08-23 01:08:03.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2006-08-23 12:30:13.000000000 +0000
@@ -1,3 +1,15 @@
+2006-08-22  Jason Merrill  <jason@redhat.com>
+
+	PR c++/23372
+	* call.c (build_over_call): Don't make a copy here if build_call 
+	will make one too.
+
+2006-08-22  Andrew Pinski  <pinskia@physics.uc.edu>
+
+	PR C++/28450
+	* cp/init.c (build_zero_init): Handle VECTOR_TYPE and
+	COMPLEX_TYPEs.
+
 2006-08-22  Simon Martin  <simartin@users.sourceforge.net>
 
 	PR c++/28420


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]