A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Fri Nov 23 19:20:00 GMT 2007
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: 6631k -> 6630k
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: 6647k -> 6646k
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: 6691k -> 6694k
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: 6711k -> 6710k
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: 6711k -> 6710k
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: 21175k -> 21178k
Peak memory use before GGC: 7806k
Peak memory use after GGC: 7185k
Maximum of released memory in single GGC run: 1550k
Garbage: 37870k
Leak: 5511k
Overhead: 4574k
GGC runs: 371
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 23179k -> 23182k
Peak memory use before GGC: 9647k
Peak memory use after GGC: 8953k
Maximum of released memory in single GGC run: 1838k
Garbage: 38230k
Leak: 8316k
Overhead: 5202k
GGC runs: 342
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage increased from 51370k to 51665k, overall 0.58%
Overall memory needed: 31699k -> 31678k
Peak memory use before GGC: 16352k -> 16354k
Peak memory use after GGC: 16184k
Maximum of released memory in single GGC run: 1360k -> 1367k
Garbage: 51370k -> 51665k
Leak: 5659k
Overhead: 5690k -> 5716k
GGC runs: 442
comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 70240k to 70988k, overall 1.07%
Overall memory needed: 33623k -> 33558k
Peak memory use before GGC: 16440k -> 16434k
Peak memory use after GGC: 16270k -> 16271k
Maximum of released memory in single GGC run: 1316k
Garbage: 70240k -> 70988k
Leak: 5997k -> 5985k
Overhead: 7944k -> 8011k
GGC runs: 510
comparing combine.c compilation at -O3 level:
Amount of produced GGC garbage increased from 91576k to 92702k, overall 1.23%
Overall memory needed: 38079k -> 37878k
Peak memory use before GGC: 16654k -> 16657k
Peak memory use after GGC: 16380k
Maximum of released memory in single GGC run: 2119k -> 2120k
Garbage: 91576k -> 92702k
Leak: 6105k
Overhead: 10489k -> 10589k
GGC runs: 544 -> 545
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 135919k -> 135922k
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: 13926k
GGC runs: 292
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 137175k -> 137178k
Peak memory use before GGC: 58140k
Peak memory use after GGC: 32597k
Maximum of released memory in single GGC run: 33256k
Garbage: 128409k
Leak: 10040k
Overhead: 14282k
GGC runs: 289
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 143191k -> 143174k
Peak memory use before GGC: 56210k
Peak memory use after GGC: 49982k
Maximum of released memory in single GGC run: 23976k
Garbage: 206548k
Leak: 9274k
Overhead: 23997k
GGC runs: 315
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 186559k -> 186558k
Peak memory use before GGC: 56849k
Peak memory use after GGC: 51569k
Maximum of released memory in single GGC run: 22720k
Garbage: 247842k
Leak: 10361k
Overhead: 29739k
GGC runs: 345
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 190983k -> 190978k
Peak memory use before GGC: 68525k
Peak memory use after GGC: 62278k
Maximum of released memory in single GGC run: 23239k
Garbage: 275916k
Leak: 10397k
Overhead: 31624k
GGC runs: 350
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 147487k -> 147456k
Peak memory use before GGC: 84523k
Peak memory use after GGC: 83686k
Maximum of released memory in single GGC run: 16844k
Garbage: 202344k
Leak: 48125k
Overhead: 23725k
GGC runs: 420
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 168263k -> 168260k
Peak memory use before GGC: 96488k
Peak memory use after GGC: 95531k
Maximum of released memory in single GGC run: 17652k
Garbage: 207868k
Leak: 69738k
Overhead: 28710k
GGC runs: 392
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 282661k to 283635k, overall 0.34%
Overall memory needed: 115266k -> 114618k
Peak memory use before GGC: 83997k
Peak memory use after GGC: 83161k
Maximum of released memory in single GGC run: 16342k
Garbage: 282661k -> 283635k
Leak: 47353k
Overhead: 27746k -> 27855k
GGC runs: 518 -> 522
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 346892k to 349068k, overall 0.63%
Overall memory needed: 117510k -> 116078k
Peak memory use before GGC: 84113k
Peak memory use after GGC: 83276k
Maximum of released memory in single GGC run: 16340k
Garbage: 346892k -> 349068k
Leak: 48277k
Overhead: 34530k -> 34760k
GGC runs: 594 -> 596
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 378499k to 380680k, overall 0.58%
Overall memory needed: 122742k -> 121294k
Peak memory use before GGC: 85266k
Peak memory use after GGC: 84413k
Maximum of released memory in single GGC run: 16732k
Garbage: 378499k -> 380680k
Leak: 48720k
Overhead: 37216k -> 37445k
GGC runs: 625 -> 628
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: 436727k -> 436678k
Peak memory use before GGC: 78856k
Peak memory use after GGC: 69705k
Maximum of released memory in single GGC run: 37753k
Garbage: 234244k
Leak: 16006k
Overhead: 35358k
GGC runs: 105
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 350835k -> 350646k
Peak memory use before GGC: 74692k
Peak memory use after GGC: 69706k
Maximum of released memory in single GGC run: 32246k
Garbage: 245723k
Leak: 16178k
Overhead: 38676k
GGC runs: 117
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1303783k -> 1303782k
Peak memory use before GGC: 130289k
Peak memory use after GGC: 120623k
Maximum of released memory in single GGC run: 61473k
Garbage: 359151k
Leak: 24557k
Overhead: 46972k
GGC runs: 105
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-11-23 01:10:42.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-11-23 17:01:58.000000000 +0000
@@ -1,3 +1,40 @@
+2007-11-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * reload.c (find_reloads_address_1) <autoincdec cases>:
+ Call REG_OK_FOR_CONTEXT with the autoincdec code, not
+ outer_code.
+
+2007-11-23 Richard Guenther <rguenther@suse.de>
+ Michael Matz <matz@suse.de>
+
+ PR tree-optimization/34176
+ * alloc-pool.h (empty_alloc_pool): Declare.
+ * alloc-pool.c (empty_alloc_pool): New function.
+ * tree-ssa-sccvn.c (vn_reference_lookup): Also lookup from the
+ valid table if a lookup from the optimistic table failed.
+ (vn_unary_op_lookup): Likewise.
+ (vn_binary_op_lookup): Likewise.
+ (vn_phi_lookup): Likewise.
+ (process_scc): Clear optimistic tables before every iteration.
+
+2007-11-23 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-copy.c (may_propagate_copy): Remove redundant
+ checks.
+ (merge_alias_info): Do verification only if checking is
+ enabled. Merge flow-sensitive alias information in simple
+ cases.
+ * tree-ssa-operands.c (get_addr_dereference_operands): Also
+ complain about missing NMTs.
+
+2007-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34198
+ * c-common.c (conversion_warning): For INTEGER_TYPE to
+ INTEGER_TYPE conversions call get_narrower on expr to avoid
+ spurious warnings from binop shortening or when the implicit
+ conversion can't change the value.
+
2007-11-22 Joseph Myers <joseph@codesourcery.com>
PR c/14050
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.
More information about the Gcc-regression
mailing list