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 empty function compilation at -O0 level:
    Overall memory needed: 18258k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 422k
    Leak: 2271k
    Overhead: 446k
    GGC runs: 3

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 18274k
    Peak memory use before GGC: 2260k
    Peak memory use after GGC: 1967k
    Maximum of released memory in single GGC run: 293k
    Garbage: 424k
    Leak: 2303k
    Overhead: 450k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 18358k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 427k
    Leak: 2274k
    Overhead: 446k
    GGC runs: 4

comparing empty function compilation at -O2 level:
    Overall memory needed: 18370k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 430k
    Leak: 2274k
    Overhead: 447k
    GGC runs: 4

comparing empty function compilation at -O3 level:
    Overall memory needed: 18370k
    Peak memory use before GGC: 2233k
    Peak memory use after GGC: 1940k
    Maximum of released memory in single GGC run: 293k
    Garbage: 430k
    Leak: 2274k
    Overhead: 447k
    GGC runs: 4

comparing combine.c compilation at -O0 level:
    Overall memory needed: 28442k -> 28446k
    Peak memory use before GGC: 9309k
    Peak memory use after GGC: 8848k
    Maximum of released memory in single GGC run: 2665k
    Garbage: 36852k
    Leak: 6461k
    Overhead: 4869k
    GGC runs: 279

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 30538k
    Peak memory use before GGC: 10859k
    Peak memory use after GGC: 10489k
    Maximum of released memory in single GGC run: 2415k
    Garbage: 37429k
    Leak: 9271k
    Overhead: 5537k
    GGC runs: 271

comparing combine.c compilation at -O1 level:
    Overall memory needed: 40286k
    Peak memory use before GGC: 17299k
    Peak memory use after GGC: 17124k
    Maximum of released memory in single GGC run: 2274k
    Garbage: 57478k
    Leak: 6515k
    Overhead: 6226k
    GGC runs: 356

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29806k
    Peak memory use before GGC: 17295k
    Peak memory use after GGC: 17124k
    Maximum of released memory in single GGC run: 2869k
    Garbage: 74904k
    Leak: 6621k
    Overhead: 8477k
    GGC runs: 412

comparing combine.c compilation at -O3 level:
    Overall memory needed: 28906k
    Peak memory use before GGC: 18423k -> 18422k
    Peak memory use after GGC: 17851k
    Maximum of released memory in single GGC run: 4100k
    Garbage: 112607k -> 112607k
    Leak: 6688k
    Overhead: 13023k -> 13023k
    GGC runs: 462

    Overall memory needed: 28442k -> 28446k
    Peak memory use before GGC: 9309k
    Peak memory use after GGC: 8848k
    Maximum of released memory in single GGC run: 2665k
    Garbage: 36852k
    Leak: 6461k
    Overhead: 4869k
    GGC runs: 279

comparing combine.c compilation at -O1 level:
    Overall memory needed: 40286k
    Peak memory use before GGC: 17299k
    Peak memory use after GGC: 17124k
    Maximum of released memory in single GGC run: 2274k
    Garbage: 57478k
    Leak: 6515k
    Overhead: 6226k
    GGC runs: 356

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29806k
    Peak memory use before GGC: 17295k
    Peak memory use after GGC: 17124k
    Maximum of released memory in single GGC run: 2869k
    Garbage: 74904k
    Leak: 6621k
    Overhead: 8477k
    GGC runs: 412

comparing combine.c compilation at -O3 level:
    Overall memory needed: 28906k
    Peak memory use before GGC: 18423k -> 18422k
    Peak memory use after GGC: 17851k
    Maximum of released memory in single GGC run: 4100k
    Garbage: 112607k -> 112607k
    Leak: 6688k
    Overhead: 13023k -> 13023k
    GGC runs: 462

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 88246k
    Peak memory use before GGC: 69793k
    Peak memory use after GGC: 44203k
    Maximum of released memory in single GGC run: 36964k
    Garbage: 129066k
    Leak: 9520k
    Overhead: 17001k
    GGC runs: 216

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 89426k
    Peak memory use before GGC: 70942k
    Peak memory use after GGC: 45459k
    Maximum of released memory in single GGC run: 36964k
    Garbage: 130494k
    Leak: 10951k
    Overhead: 17380k
    GGC runs: 212

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 114182k
    Peak memory use before GGC: 90379k
    Peak memory use after GGC: 83741k
    Maximum of released memory in single GGC run: 31852k
    Garbage: 277776k
    Leak: 9362k
    Overhead: 29792k
    GGC runs: 221

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 129386k
    Peak memory use before GGC: 92608k
    Peak memory use after GGC: 84720k
    Maximum of released memory in single GGC run: 30398k
    Garbage: 317198k
    Leak: 9364k
    Overhead: 36371k
    GGC runs: 243

comparing insn-attrtab.c compilation at -O3 level:
  Ovarall memory allocated via mmap and sbrk decreased from 134238k to 129422k, overall -3.72%
    Overall memory needed: 134238k -> 129422k
    Peak memory use before GGC: 92634k
    Peak memory use after GGC: 84746k
    Maximum of released memory in single GGC run: 30585k
    Garbage: 318053k -> 318053k
    Leak: 9367k
    Overhead: 36606k -> 36606k
    GGC runs: 247

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 120002k
    Peak memory use before GGC: 93312k
    Peak memory use after GGC: 92385k
    Maximum of released memory in single GGC run: 20013k
    Garbage: 207743k
    Leak: 47730k
    Overhead: 20983k
    GGC runs: 409

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 132502k
    Peak memory use before GGC: 105441k
    Peak memory use after GGC: 104390k
    Maximum of released memory in single GGC run: 19646k
    Garbage: 214331k
    Leak: 70689k
    Overhead: 26600k
    GGC runs: 380

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 119138k
    Peak memory use before GGC: 97923k
    Peak memory use after GGC: 95711k
    Maximum of released memory in single GGC run: 18552k
    Garbage: 446417k -> 446416k
    Leak: 50112k -> 50112k
    Overhead: 32789k -> 32789k
    GGC runs: 559

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 119162k
    Peak memory use before GGC: 97924k
    Peak memory use after GGC: 95711k
    Maximum of released memory in single GGC run: 18552k
    Garbage: 505749k -> 505748k
    Leak: 50796k -> 50796k
    Overhead: 40002k -> 40002k
    GGC runs: 613

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 118994k
    Peak memory use before GGC: 97968k
    Peak memory use after GGC: 96997k
    Maximum of released memory in single GGC run: 18932k
    Garbage: 526793k -> 526790k
    Leak: 50369k -> 50369k
    Overhead: 40926k -> 40926k
    GGC runs: 627

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 137962k
    Peak memory use before GGC: 81913k
    Peak memory use after GGC: 58792k
    Maximum of released memory in single GGC run: 45493k
    Garbage: 147245k
    Leak: 7541k
    Overhead: 25304k
    GGC runs: 82

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 138138k
    Peak memory use before GGC: 82546k
    Peak memory use after GGC: 59426k
    Maximum of released memory in single GGC run: 45558k
    Garbage: 147415k
    Leak: 9249k
    Overhead: 25769k
    GGC runs: 88

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 424334k
    Peak memory use before GGC: 205233k
    Peak memory use after GGC: 201009k
    Maximum of released memory in single GGC run: 101903k
    Garbage: 272136k
    Leak: 47606k -> 47606k
    Overhead: 31282k -> 31282k
    GGC runs: 101

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 352478k -> 352294k
    Peak memory use before GGC: 206006k
    Peak memory use after GGC: 201782k
    Maximum of released memory in single GGC run: 108808k
    Garbage: 352361k
    Leak: 48189k -> 48189k
    Overhead: 47027k -> 47027k
    GGC runs: 110

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 781378k -> 781446k
    Peak memory use before GGC: 314929k -> 314928k
    Peak memory use after GGC: 293272k
    Maximum of released memory in single GGC run: 165197k -> 165196k
    Garbage: 494379k -> 494379k
    Leak: 65522k -> 65522k
    Overhead: 59885k -> 59885k
    GGC runs: 98

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2006-11-26 09:37:45.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2006-11-27 02:09:55.000000000 +0000
@@ -1,3 +1,23 @@
+2006-11-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* doc/install.texi: Move GMP/MPFR configure options from Fortran
+	section to general section.  Remove documentation for
+	--with-mpfr-dir and --with-gmp-dir, add documentation for
+	--with-mpfr-include, --with-mpfr-lib, --with-gmp-include and
+	--with-gmp-lib.
+
+	* builtins.c (fold_builtin_fmin_fmax): Handle NaN arguments.
+
+2006-11-26  Razya Ladklesky  <razya@il.ibm.com> 
+
+        * testsuite/gcc.dg/ipa/ipa-6.c: New.
+        
+2006-11-26  Razya Ladklesky  <razya@il.ibm.com>
+	
+	PR tree-optimization/29122
+	* tree-inline.c (tree_function_versioning): Update DECL_ASSEMBLER_NAME 
+	for the new version.  Assign NULL to DECL_RTL of the new version. 
+
 2006-11-25  Uros Bizjak  <ubizjak@gmail.com>
 
 	* reg-stack.c (get_true_reg): Fix UNSPEC_TRUNC_NOOP handling.
@@ -8475,8 +8495,6 @@
 	* langhooks-def.h (lhd_dwarf_name): Declare.
 	(LANG_HOOKS_DWARF_NAME): New macro, defaults to lhd_dwarf_name.
 	* dwarf2out.c (dwarf2_name): Use the dwarf_name	language hook.
-	* ada/misc.c (gnat_dwarf_name): New function.
-	(LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name.
 
 2006-05-19  Richard Sandiford  <richard@codesourcery.com>
 


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]