This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased GCC's memory consumption!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Thu, 21 Dec 2006 22:12:34 +0000
- Subject: 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: 18293k -> 18297k
Peak memory use before GGC: 2235k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 293k
Garbage: 423k -> 423k
Leak: 2273k
Overhead: 446k -> 446k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18309k -> 18313k
Peak memory use before GGC: 2263k
Peak memory use after GGC: 1970k
Maximum of released memory in single GGC run: 293k
Garbage: 426k -> 426k
Leak: 2305k
Overhead: 450k -> 450k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18397k
Peak memory use before GGC: 2235k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 293k
Garbage: 427k -> 427k
Leak: 2275k
Overhead: 446k -> 446k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18409k
Peak memory use before GGC: 2236k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 294k
Garbage: 430k -> 430k
Leak: 2275k
Overhead: 447k -> 447k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18409k
Peak memory use before GGC: 2236k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 294k
Garbage: 430k -> 430k
Leak: 2275k
Overhead: 447k -> 447k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28461k -> 28465k
Peak memory use before GGC: 9288k
Peak memory use after GGC: 8803k
Maximum of released memory in single GGC run: 2642k
Garbage: 37557k -> 37567k
Leak: 6454k
Overhead: 4872k -> 4875k
GGC runs: 281
comparing combine.c compilation at -O0 -g level:
Amount of memory still referenced at the end of compilation increased from 9330k to 9346k, overall 0.17%
Overall memory needed: 30537k -> 30541k
Peak memory use before GGC: 10834k
Peak memory use after GGC: 10463k
Maximum of released memory in single GGC run: 2320k
Garbage: 38132k -> 38128k
Leak: 9330k -> 9346k
Overhead: 5574k -> 5576k
GGC runs: 272
comparing combine.c compilation at -O1 level:
Overall memory needed: 29474k
Peak memory use before GGC: 16963k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2252k -> 2251k
Garbage: 55738k -> 55759k
Leak: 6489k
Overhead: 9959k -> 9966k
GGC runs: 358 -> 357
comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 71830k to 71973k, overall 0.20%
Overall memory needed: 29474k
Peak memory use before GGC: 16967k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2371k -> 2373k
Garbage: 71830k -> 71973k
Leak: 6602k
Overhead: 11849k -> 11954k
GGC runs: 412
comparing combine.c compilation at -O3 level:
Overall memory needed: 29602k
Peak memory use before GGC: 18067k
Peak memory use after GGC: 17600k
Maximum of released memory in single GGC run: 3678k -> 3689k
Garbage: 106302k -> 106221k
Leak: 6684k -> 6684k
Overhead: 16904k -> 16876k
GGC runs: 460
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 9278k to 9518k, overall 2.59%
Overall memory needed: 89650k
Peak memory use before GGC: 71193k
Peak memory use after GGC: 44699k
Maximum of released memory in single GGC run: 37868k
Garbage: 132390k -> 132141k
Leak: 9278k -> 9518k
Overhead: 16954k -> 16956k
GGC runs: 212 -> 211
comparing insn-attrtab.c compilation at -O0 -g level:
Amount of produced GGC garbage increased from 133284k to 133548k, overall 0.20%
Overall memory needed: 90826k
Peak memory use before GGC: 72354k
Peak memory use after GGC: 45966k
Maximum of released memory in single GGC run: 37868k
Garbage: 133284k -> 133548k
Leak: 11221k -> 10981k
Overhead: 17349k -> 17351k
GGC runs: 209
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 93730k
Peak memory use before GGC: 71858k
Peak memory use after GGC: 67990k
Maximum of released memory in single GGC run: 31668k
Garbage: 229900k -> 229899k
Leak: 9343k
Overhead: 29520k -> 29520k
GGC runs: 220
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 124006k
Peak memory use before GGC: 79550k
Peak memory use after GGC: 73715k
Maximum of released memory in single GGC run: 30212k
Garbage: 282733k -> 282712k
Leak: 9345k
Overhead: 35781k -> 35776k
GGC runs: 244 -> 243
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 123766k
Peak memory use before GGC: 79576k
Peak memory use after GGC: 73740k
Maximum of released memory in single GGC run: 30407k -> 30406k
Garbage: 283552k -> 283552k
Leak: 9350k
Overhead: 36009k -> 36009k
GGC runs: 247
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of produced GGC garbage increased from 212865k to 213108k, overall 0.11%
Overall memory needed: 119066k
Peak memory use before GGC: 92331k
Peak memory use after GGC: 91417k
Maximum of released memory in single GGC run: 19248k
Garbage: 212865k -> 213108k
Leak: 48116k
Overhead: 21222k -> 21264k
GGC runs: 417
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Amount of produced GGC garbage increased from 219448k to 219694k, overall 0.11%
Overall memory needed: 131642k
Peak memory use before GGC: 104692k
Peak memory use after GGC: 103652k
Maximum of released memory in single GGC run: 18936k
Garbage: 219448k -> 219694k
Leak: 71548k
Overhead: 27126k -> 27169k
GGC runs: 390
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119502k
Peak memory use before GGC: 96665k
Peak memory use after GGC: 94462k
Maximum of released memory in single GGC run: 17940k
Garbage: 442789k -> 442403k
Leak: 50182k -> 50182k
Overhead: 103827k -> 100285k
GGC runs: 562 -> 563
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119554k
Peak memory use before GGC: 96692k
Peak memory use after GGC: 94489k
Maximum of released memory in single GGC run: 18081k
Garbage: 497651k -> 497658k
Leak: 51150k -> 51150k
Overhead: 58753k -> 58884k
GGC runs: 616
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 121138k
Peak memory use before GGC: 97648k
Peak memory use after GGC: 96144k
Maximum of released memory in single GGC run: 18476k
Garbage: 518089k -> 517671k
Leak: 51123k -> 51122k
Overhead: 58756k -> 58405k
GGC runs: 621
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137634k -> 137290k
Peak memory use before GGC: 81587k
Peak memory use after GGC: 58467k
Maximum of released memory in single GGC run: 45166k
Garbage: 148526k -> 148528k
Leak: 7542k
Overhead: 25329k -> 25329k
GGC runs: 82
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138014k
Peak memory use before GGC: 82233k
Peak memory use after GGC: 59113k
Maximum of released memory in single GGC run: 45232k
Garbage: 148736k -> 148738k
Leak: 9309k
Overhead: 25824k -> 25824k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Peak amount of GGC memory still allocated after garbage collectin increased from 192217k to 193352k, overall 0.59%
Amount of produced GGC garbage increased from 284125k to 287375k, overall 1.14%
Overall memory needed: 418794k -> 421226k
Peak memory use before GGC: 199519k -> 199539k
Peak memory use after GGC: 192217k -> 193352k
Maximum of released memory in single GGC run: 109875k -> 112477k
Garbage: 284125k -> 287375k
Leak: 29778k -> 29778k
Overhead: 31548k -> 32193k
GGC runs: 98
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Peak amount of GGC memory still allocated after garbage collectin increased from 192210k to 193345k, overall 0.59%
Overall memory needed: 343378k -> 343394k
Peak memory use before GGC: 199512k -> 199532k
Peak memory use after GGC: 192210k -> 193345k
Maximum of released memory in single GGC run: 111890k -> 111911k
Garbage: 364364k -> 364383k
Leak: 30361k -> 30361k
Overhead: 47297k -> 47296k
GGC runs: 104
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 748734k -> 749294k
Peak memory use before GGC: 317622k -> 317673k
Peak memory use after GGC: 296096k -> 296148k
Maximum of released memory in single GGC run: 186389k -> 186409k
Garbage: 504442k -> 504462k
Leak: 45414k -> 45414k
Overhead: 60274k -> 60273k
GGC runs: 99
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-12-21 04:54:51.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-12-21 20:34:34.000000000 +0000
@@ -1,3 +1,25 @@
+2006-12-21 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-ssa-structalias.c (build_constraint_graph): Insert complex
+ offsetted constraints into rhsvar, not lhsvar.
+
+2006-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/30262
+ PR middle-end/30263
+ * tree-nested.c (walk_asm_expr): New function.
+ (walk_stmts): Use it for ASM_EXPR.
+
+ PR target/30230
+ * config/ia64/ia64.c (ia64_add_bundle_selector_before): New function.
+ (bundling): Use it.
+
+2006-12-21 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR target/28966
+ PR target/29248
+ * reload1.c (reload): Realign stack after it changes size.
+
2006-12-20 Roger Sayle <roger@eyesopen.com>
* simplify-rtx.c (simplify_subreg): Use the correct mode when
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.