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 increased 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: 6629k -> 6632k
    Peak memory use before GGC: 1095k
    Peak memory use after GGC: 993k
    Maximum of released memory in single GGC run: 129k
    Garbage: 237k
    Leak: 951k
    Overhead: 80k
    GGC runs: 2

comparing empty function compilation at -O0 -g level:
    Overall memory needed: 6645k -> 6648k
    Peak memory use before GGC: 1122k
    Peak memory use after GGC: 1020k
    Maximum of released memory in single GGC run: 131k
    Garbage: 239k
    Leak: 983k
    Overhead: 84k
    GGC runs: 3

comparing empty function compilation at -O1 level:
    Overall memory needed: 6693k -> 6692k
    Peak memory use before GGC: 1095k
    Peak memory use after GGC: 993k
    Maximum of released memory in single GGC run: 131k
    Garbage: 239k
    Leak: 951k
    Overhead: 80k
    GGC runs: 2

comparing empty function compilation at -O2 level:
    Overall memory needed: 6709k -> 6712k
    Peak memory use before GGC: 1095k
    Peak memory use after GGC: 994k
    Maximum of released memory in single GGC run: 134k
    Garbage: 242k
    Leak: 952k
    Overhead: 81k
    GGC runs: 2

comparing empty function compilation at -O3 level:
    Overall memory needed: 6709k -> 6712k
    Peak memory use before GGC: 1095k
    Peak memory use after GGC: 994k
    Maximum of released memory in single GGC run: 134k
    Garbage: 242k
    Leak: 952k
    Overhead: 81k
    GGC runs: 2

comparing combine.c compilation at -O0 level:
    Overall memory needed: 21177k -> 21176k
    Peak memory use before GGC: 7806k
    Peak memory use after GGC: 7185k
    Maximum of released memory in single GGC run: 1550k
    Garbage: 37872k
    Leak: 5512k
    Overhead: 4577k
    GGC runs: 371

comparing combine.c compilation at -O0 -g level:
    Overall memory needed: 23181k -> 23180k
    Peak memory use before GGC: 9647k
    Peak memory use after GGC: 8953k
    Maximum of released memory in single GGC run: 1838k
    Garbage: 38232k
    Leak: 8317k
    Overhead: 5204k
    GGC runs: 342

comparing combine.c compilation at -O1 level:
    Overall memory needed: 31677k -> 31680k
    Peak memory use before GGC: 16359k
    Peak memory use after GGC: 16190k
    Maximum of released memory in single GGC run: 1367k
    Garbage: 51670k
    Leak: 5659k
    Overhead: 5719k
    GGC runs: 442

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 70989k to 71696k, overall 1.00%
    Overall memory needed: 33565k -> 33560k
    Peak memory use before GGC: 16442k -> 16445k
    Peak memory use after GGC: 16278k
    Maximum of released memory in single GGC run: 1316k
    Garbage: 70989k -> 71696k
    Leak: 5989k
    Overhead: 8013k -> 8064k
    GGC runs: 510 -> 511

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 92696k to 93655k, overall 1.04%
  Amount of memory still referenced at the end of compilation increased from 6089k to 6097k, overall 0.12%
    Overall memory needed: 37885k -> 37884k
    Peak memory use before GGC: 16664k -> 16668k
    Peak memory use after GGC: 16388k
    Maximum of released memory in single GGC run: 2119k
    Garbage: 92696k -> 93655k
    Leak: 6089k -> 6097k
    Overhead: 10592k -> 10663k
    GGC runs: 544 -> 547

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 135921k -> 135920k
    Peak memory use before GGC: 56998k
    Peak memory use after GGC: 31455k
    Maximum of released memory in single GGC run: 33256k
    Garbage: 128179k
    Leak: 8380k
    Overhead: 13927k
    GGC runs: 292

comparing insn-attrtab.c compilation at -O0 -g level:
    Overall memory needed: 137177k -> 137176k
    Peak memory use before GGC: 58140k
    Peak memory use after GGC: 32597k
    Maximum of released memory in single GGC run: 33256k
    Garbage: 128410k
    Leak: 10040k
    Overhead: 14283k
    GGC runs: 289

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 143185k -> 143172k
    Peak memory use before GGC: 56210k
    Peak memory use after GGC: 49982k
    Maximum of released memory in single GGC run: 23977k
    Garbage: 206550k -> 206550k
    Leak: 9274k
    Overhead: 23998k -> 23998k
    GGC runs: 315

comparing insn-attrtab.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 247845k to 248134k, overall 0.12%
    Overall memory needed: 186569k -> 186588k
    Peak memory use before GGC: 56849k -> 56852k
    Peak memory use after GGC: 51569k -> 51572k
    Maximum of released memory in single GGC run: 22720k -> 22735k
    Garbage: 247845k -> 248134k
    Leak: 10361k -> 10361k
    Overhead: 29741k -> 29756k
    GGC runs: 345 -> 347

comparing insn-attrtab.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 275919k to 276297k, overall 0.14%
    Overall memory needed: 190997k -> 190960k
    Peak memory use before GGC: 68526k
    Peak memory use after GGC: 62279k
    Maximum of released memory in single GGC run: 23239k -> 23260k
    Garbage: 275919k -> 276297k
    Leak: 10398k
    Overhead: 31625k -> 31646k
    GGC runs: 350 -> 351

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 147488k -> 147435k
    Peak memory use before GGC: 84523k
    Peak memory use after GGC: 83686k
    Maximum of released memory in single GGC run: 16844k
    Garbage: 202407k
    Leak: 48152k
    Overhead: 23847k
    GGC runs: 420

comparing Gerald's testcase PR8361 compilation at -O0 -g level:
    Overall memory needed: 168260k -> 168259k
    Peak memory use before GGC: 96488k
    Peak memory use after GGC: 95531k
    Maximum of released memory in single GGC run: 17652k
    Garbage: 207935k
    Leak: 69765k
    Overhead: 28833k
    GGC runs: 392

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 122008k -> 122023k
    Peak memory use before GGC: 84530k -> 84498k
    Peak memory use after GGC: 83692k -> 83660k
    Maximum of released memory in single GGC run: 16330k -> 16328k
    Garbage: 294442k -> 294289k
    Leak: 47403k -> 47403k
    Overhead: 29146k -> 29142k
    GGC runs: 521

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Amount of produced GGC garbage increased from 361882k to 366209k, overall 1.20%
    Overall memory needed: 125020k -> 124995k
    Peak memory use before GGC: 84836k -> 84723k
    Peak memory use after GGC: 83921k -> 83878k
    Maximum of released memory in single GGC run: 16328k -> 16327k
    Garbage: 361882k -> 366209k
    Leak: 48337k -> 48338k
    Overhead: 36277k -> 36598k
    GGC runs: 593 -> 600

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Amount of produced GGC garbage increased from 392852k to 397899k, overall 1.28%
    Overall memory needed: 130500k -> 130003k
    Peak memory use before GGC: 85954k -> 85938k
    Peak memory use after GGC: 85102k -> 85070k
    Maximum of released memory in single GGC run: 16722k -> 16721k
    Garbage: 392852k -> 397899k
    Leak: 48864k -> 48863k
    Overhead: 38919k -> 39288k
    GGC runs: 621 -> 627

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 378595k -> 378591k
    Peak memory use before GGC: 101208k
    Peak memory use after GGC: 56862k
    Maximum of released memory in single GGC run: 50582k
    Garbage: 178902k
    Leak: 6097k
    Overhead: 30781k
    GGC runs: 106

comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
    Overall memory needed: 379391k
    Peak memory use before GGC: 101839k
    Peak memory use after GGC: 57492k
    Maximum of released memory in single GGC run: 50583k
    Garbage: 179007k
    Leak: 7799k
    Overhead: 31213k
    GGC runs: 111

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 437897k -> 434296k
    Peak memory use before GGC: 78857k
    Peak memory use after GGC: 70436k
    Maximum of released memory in single GGC run: 37753k
    Garbage: 235356k
    Leak: 16073k
    Overhead: 35563k
    GGC runs: 105

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 358237k -> 358032k
    Peak memory use before GGC: 75422k
    Peak memory use after GGC: 70436k
    Maximum of released memory in single GGC run: 32245k
    Garbage: 246835k -> 246836k
    Leak: 16245k
    Overhead: 38881k -> 38881k
    GGC runs: 116

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 1311261k -> 1312256k
    Peak memory use before GGC: 136584k
    Peak memory use after GGC: 127941k
    Maximum of released memory in single GGC run: 59911k
    Garbage: 371405k -> 371406k
    Leak: 24376k
    Overhead: 48461k -> 48461k
    GGC runs: 103

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2007-11-29 16:36:18.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2007-11-30 03:16:19.000000000 +0000
@@ -1,3 +1,25 @@
+2007-11-30  Ben Elliston  <bje@au.ibm.com>
+
+	* config/vax/vax.h (ASM_FORMAT_PRIVATE_NAME): Remove. Use default.
+
+2007-11-29  Zdenek Dvorak  <ook@ucw.cz>
+
+	PR tree-optimization/34244
+	* tree-vrp.c (adjust_range_with_scev): Clear scev cache.
+	(record_numbers_of_iterations): New function.
+	(execute_vrp): Cache the numbers of iterations of loops.
+	* tree-scalar-evolution.c (scev_reset_except_niters):
+	New function.
+	(scev_reset): Use scev_reset_except_niters.
+	* tree-scalar-evolution.h (scev_reset_except_niters): Declare.
+
+2007-11-29  Jan Hubicka  <jh@suse.cz>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/33434
+	* tree-inline.c (setup_one_parameter): If the value passed to
+	a parameter is never used, don't set it up.
+
 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/32130


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]