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, 13 Nov 2008 05:41:07 +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: 8208k
Peak memory use before GGC: 1291k
Peak memory use after GGC: 1217k
Maximum of released memory in single GGC run: 134k
Garbage: 218k
Leak: 1221k
Overhead: 136k
GGC runs: 4
Pre-IPA-Garbage: 207k
Pre-IPA-Leak: 1224k
Pre-IPA-Overhead: 135k
Post-IPA-Garbage: 207k
Post-IPA-Leak: 1224k
Post-IPA-Overhead: 135k
comparing empty function compilation at -O0 -g level:
Overall memory needed: 8452k
Peak memory use before GGC: 1319k
Peak memory use after GGC: 1245k
Maximum of released memory in single GGC run: 133k
Garbage: 220k
Leak: 1254k
Overhead: 141k
GGC runs: 4
Pre-IPA-Garbage: 207k
Pre-IPA-Leak: 1224k
Pre-IPA-Overhead: 135k
Post-IPA-Garbage: 207k
Post-IPA-Leak: 1224k
Post-IPA-Overhead: 135k
comparing empty function compilation at -O1 level:
Overall memory needed: 8236k -> 8240k
Peak memory use before GGC: 1291k
Peak memory use after GGC: 1217k
Maximum of released memory in single GGC run: 134k
Garbage: 221k
Leak: 1221k
Overhead: 137k
GGC runs: 4
Pre-IPA-Garbage: 207k
Pre-IPA-Leak: 1224k
Pre-IPA-Overhead: 135k
Post-IPA-Garbage: 207k
Post-IPA-Leak: 1224k
Post-IPA-Overhead: 135k
comparing empty function compilation at -O2 level:
Overall memory needed: 8452k
Peak memory use before GGC: 1291k
Peak memory use after GGC: 1218k
Maximum of released memory in single GGC run: 135k
Garbage: 226k
Leak: 1221k
Overhead: 138k
GGC runs: 4
Pre-IPA-Garbage: 207k
Pre-IPA-Leak: 1224k
Pre-IPA-Overhead: 135k
Post-IPA-Garbage: 207k
Post-IPA-Leak: 1224k
Post-IPA-Overhead: 135k
comparing empty function compilation at -O3 level:
Overall memory needed: 8456k
Peak memory use before GGC: 1291k
Peak memory use after GGC: 1218k
Maximum of released memory in single GGC run: 135k
Garbage: 226k
Leak: 1221k
Overhead: 138k
GGC runs: 4
Pre-IPA-Garbage: 207k
Pre-IPA-Leak: 1224k
Pre-IPA-Overhead: 135k
Post-IPA-Garbage: 207k
Post-IPA-Leak: 1224k
Post-IPA-Overhead: 135k
comparing combine.c compilation at -O0 level:
Overall memory needed: 31988k
Peak memory use before GGC: 18018k
Peak memory use after GGC: 17801k
Maximum of released memory in single GGC run: 1839k
Garbage: 39406k
Leak: 5800k
Overhead: 5220k
GGC runs: 337
Pre-IPA-Garbage: 12408k
Pre-IPA-Leak: 19349k
Pre-IPA-Overhead: 2559k
Post-IPA-Garbage: 12408k
Post-IPA-Leak: 19349k
Post-IPA-Overhead: 2559k
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 34008k
Peak memory use before GGC: 19938k
Peak memory use after GGC: 19657k
Maximum of released memory in single GGC run: 1849k
Garbage: 39703k
Leak: 9082k
Overhead: 6038k
GGC runs: 321
Pre-IPA-Garbage: 12507k
Pre-IPA-Leak: 21623k
Pre-IPA-Overhead: 3049k
Post-IPA-Garbage: 12507k
Post-IPA-Leak: 21623k
Post-IPA-Overhead: 3049k
comparing combine.c compilation at -O1 level:
Overall memory needed: 30752k
Peak memory use before GGC: 15682k
Peak memory use after GGC: 15507k
Maximum of released memory in single GGC run: 1340k
Garbage: 46801k
Leak: 5780k
Overhead: 6014k
GGC runs: 402
Pre-IPA-Garbage: 13147k
Pre-IPA-Leak: 16845k
Pre-IPA-Overhead: 2472k
Post-IPA-Garbage: 13147k
Post-IPA-Leak: 16845k
Post-IPA-Overhead: 2472k
comparing combine.c compilation at -O2 level:
Overall memory needed: 31344k -> 31192k
Peak memory use before GGC: 15823k
Peak memory use after GGC: 15661k
Maximum of released memory in single GGC run: 1355k
Garbage: 60528k
Leak: 5809k
Overhead: 8023k
GGC runs: 469
Pre-IPA-Garbage: 13310k
Pre-IPA-Leak: 16927k
Pre-IPA-Overhead: 2491k
Post-IPA-Garbage: 13310k
Post-IPA-Leak: 16927k
Post-IPA-Overhead: 2491k
comparing combine.c compilation at -O3 level:
Overall memory needed: 31812k -> 31968k
Peak memory use before GGC: 15911k
Peak memory use after GGC: 15752k
Maximum of released memory in single GGC run: 1629k
Garbage: 72955k
Leak: 7136k
Overhead: 9459k
GGC runs: 496
Pre-IPA-Garbage: 13310k
Pre-IPA-Leak: 16927k
Pre-IPA-Overhead: 2491k
Post-IPA-Garbage: 13310k
Post-IPA-Leak: 16927k
Post-IPA-Overhead: 2491k
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 155236k
Peak memory use before GGC: 65230k
Peak memory use after GGC: 53275k
Maximum of released memory in single GGC run: 27424k
Garbage: 130437k
Leak: 8497k
Overhead: 15723k
GGC runs: 263
Pre-IPA-Garbage: 38215k
Pre-IPA-Leak: 55487k
Pre-IPA-Overhead: 8223k
Post-IPA-Garbage: 38215k
Post-IPA-Leak: 55487k
Post-IPA-Overhead: 8223k
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 157268k -> 156508k
Peak memory use before GGC: 66504k
Peak memory use after GGC: 54546k
Maximum of released memory in single GGC run: 27425k
Garbage: 130915k
Leak: 10147k
Overhead: 16179k
GGC runs: 255
Pre-IPA-Garbage: 38272k
Pre-IPA-Leak: 57029k
Pre-IPA-Overhead: 8558k
Post-IPA-Garbage: 38272k
Post-IPA-Leak: 57029k
Post-IPA-Overhead: 8558k
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 133328k
Peak memory use before GGC: 50200k
Peak memory use after GGC: 43294k
Maximum of released memory in single GGC run: 22951k
Garbage: 180978k
Leak: 7873k
Overhead: 24528k
GGC runs: 301
Pre-IPA-Garbage: 43193k
Pre-IPA-Leak: 43086k
Pre-IPA-Overhead: 7642k
Post-IPA-Garbage: 43193k
Post-IPA-Leak: 43086k
Post-IPA-Overhead: 7642k
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 148824k
Peak memory use before GGC: 50204k
Peak memory use after GGC: 45013k
Maximum of released memory in single GGC run: 17966k
Garbage: 204660k
Leak: 15536k
Overhead: 30014k
GGC runs: 326
Pre-IPA-Garbage: 43265k
Pre-IPA-Leak: 43092k
Pre-IPA-Overhead: 7651k
Post-IPA-Garbage: 43265k
Post-IPA-Leak: 43092k
Post-IPA-Overhead: 7651k
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 164760k -> 162736k
Peak memory use before GGC: 61826k
Peak memory use after GGC: 58725k
Maximum of released memory in single GGC run: 23617k
Garbage: 242519k
Leak: 7899k
Overhead: 33464k
GGC runs: 339
Pre-IPA-Garbage: 43265k
Pre-IPA-Leak: 43092k
Pre-IPA-Overhead: 7651k
Post-IPA-Garbage: 43265k
Post-IPA-Leak: 43092k
Post-IPA-Overhead: 7651k
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 52062k to 52167k, overall 0.20%
Overall memory needed: 151227k -> 151224k
Peak memory use before GGC: 82970k
Peak memory use after GGC: 82148k
Maximum of released memory in single GGC run: 14702k
Garbage: 205239k -> 205126k
Leak: 52062k -> 52167k
Overhead: 26925k -> 26925k
GGC runs: 415
Pre-IPA-Garbage: 111129k -> 111129k
Pre-IPA-Leak: 88390k -> 88391k
Pre-IPA-Overhead: 14820k
Post-IPA-Garbage: 111129k -> 111129k
Post-IPA-Leak: 88390k -> 88391k
Post-IPA-Overhead: 14820k
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Amount of memory still referenced at the end of compilation increased from 78624k to 78735k, overall 0.14%
Overall memory needed: 169155k -> 169160k
Peak memory use before GGC: 96595k -> 96597k
Peak memory use after GGC: 95639k -> 95640k
Maximum of released memory in single GGC run: 15130k
Garbage: 210902k -> 210732k
Leak: 78624k -> 78735k
Overhead: 33589k -> 33589k
GGC runs: 387
Pre-IPA-Garbage: 111751k -> 111750k
Pre-IPA-Leak: 104905k -> 104906k
Pre-IPA-Overhead: 18323k
Post-IPA-Garbage: 111751k -> 111750k
Post-IPA-Leak: 104905k -> 104906k
Post-IPA-Overhead: 18323k
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 49364k to 49470k, overall 0.21%
Overall memory needed: 111219k -> 111235k
Peak memory use before GGC: 84225k -> 84251k
Peak memory use after GGC: 83386k -> 83412k
Maximum of released memory in single GGC run: 14982k
Garbage: 282306k -> 282187k
Leak: 49364k -> 49470k
Overhead: 31646k -> 31647k
GGC runs: 503 -> 502
Pre-IPA-Garbage: 159802k -> 159773k
Pre-IPA-Leak: 88086k -> 88115k
Pre-IPA-Overhead: 19886k
Post-IPA-Garbage: 159802k -> 159773k
Post-IPA-Leak: 88086k -> 88115k
Post-IPA-Overhead: 19886k
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 49420k to 49526k, overall 0.21%
Overall memory needed: 112631k -> 112691k
Peak memory use before GGC: 85989k -> 86015k
Peak memory use after GGC: 85136k -> 85161k
Maximum of released memory in single GGC run: 14965k
Garbage: 337301k -> 337189k
Leak: 49420k -> 49526k
Overhead: 38215k -> 38216k
GGC runs: 570
Pre-IPA-Garbage: 163792k -> 163763k
Pre-IPA-Leak: 88452k -> 88481k
Pre-IPA-Overhead: 20364k
Post-IPA-Garbage: 163792k -> 163763k
Post-IPA-Leak: 88452k -> 88481k
Post-IPA-Overhead: 20364k
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 49422k to 49528k, overall 0.21%
Overall memory needed: 113715k -> 113779k
Peak memory use before GGC: 86611k -> 86636k
Peak memory use after GGC: 85750k -> 85775k
Maximum of released memory in single GGC run: 14965k
Garbage: 368780k -> 368674k
Leak: 49422k -> 49528k
Overhead: 41456k -> 41457k
GGC runs: 601
Pre-IPA-Garbage: 163872k -> 163842k
Pre-IPA-Leak: 89110k -> 89139k
Pre-IPA-Overhead: 20416k
Post-IPA-Garbage: 163872k -> 163842k
Post-IPA-Leak: 89110k -> 89139k
Post-IPA-Overhead: 20416k
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 361915k
Peak memory use before GGC: 78518k
Peak memory use after GGC: 49453k
Maximum of released memory in single GGC run: 38186k
Garbage: 144651k
Leak: 7110k
Overhead: 24889k
GGC runs: 87
Pre-IPA-Garbage: 12561k
Pre-IPA-Leak: 20190k
Pre-IPA-Overhead: 2241k
Post-IPA-Garbage: 12561k
Post-IPA-Leak: 20190k
Post-IPA-Overhead: 2241k
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 362703k
Peak memory use before GGC: 79215k
Peak memory use after GGC: 50149k
Maximum of released memory in single GGC run: 38170k
Garbage: 144752k
Leak: 9152k
Overhead: 25473k
GGC runs: 93
Pre-IPA-Garbage: 12569k
Pre-IPA-Leak: 20439k
Pre-IPA-Overhead: 2295k
Post-IPA-Garbage: 12569k
Post-IPA-Leak: 20439k
Post-IPA-Overhead: 2295k
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 242104k
Peak memory use before GGC: 73624k
Peak memory use after GGC: 66143k
Maximum of released memory in single GGC run: 34735k
Garbage: 222492k
Leak: 7551k
Overhead: 30652k
GGC runs: 97
Pre-IPA-Garbage: 48348k
Pre-IPA-Leak: 63005k
Pre-IPA-Overhead: 8797k
Post-IPA-Garbage: 48348k
Post-IPA-Leak: 63005k
Post-IPA-Overhead: 8797k
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 369128k -> 369124k
Peak memory use before GGC: 73624k
Peak memory use after GGC: 66143k
Maximum of released memory in single GGC run: 36061k
Garbage: 251005k
Leak: 7553k
Overhead: 36772k
GGC runs: 106
Pre-IPA-Garbage: 107058k
Pre-IPA-Leak: 75901k
Pre-IPA-Overhead: 14919k
Post-IPA-Garbage: 107058k
Post-IPA-Leak: 75901k
Post-IPA-Overhead: 14919k
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1027636k -> 1026544k
Peak memory use before GGC: 141898k
Peak memory use after GGC: 129175k
Maximum of released memory in single GGC run: 62763k
Garbage: 364901k
Leak: 9099k
Overhead: 44821k
GGC runs: 103
Pre-IPA-Garbage: 107058k
Pre-IPA-Leak: 75901k
Pre-IPA-Overhead: 14919k
Post-IPA-Garbage: 107058k
Post-IPA-Leak: 75901k
Post-IPA-Overhead: 14919k
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2008-11-12 07:51:39.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2008-11-13 01:24:32.000000000 +0000
@@ -1,3 +1,95 @@
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/36478
+ Revert:
+ 2007-05-07 Mike Stump <mrs@apple.com>
+ * doc/invoke.texi (Warning Options): Document that -Wempty-body
+ also checks for and while statements in C++.
+
+2008-11-12 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/27574
+ * cgraph.h: New abstract_and_needed member to struct cgraph_node.
+ * cgraphunit.c (cgraph_analyze_functions): Flag abstract functions
+ - which clones are reachable - as "abstract and needed".
+ * cgraph.c (cgraph_release_function_body): If a node is "abstract and needed",
+ do not release its DECL_INITIAL() content because that will be needed to emit
+ debug info.
+
+2008-11-12 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/27880
+ * configure.ac (GCC_CHECK_UNWIND_GETIPINFO): Use this macro
+ to set HAVE_GETIPINFO.
+ * aclocal.m4: Include ../config/unwind_ipinfo.m4.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+2008-11-12 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR bootstrap/38010
+ * gcc/config.gcc: Use darwin9.h on darwin10 as well.
+
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ Revert:
+ 2008-10-21 Jakub Jelinek <jakub@redhat.com>
+ * gimplify.c (gimplify_expr): Drop TREE_OVERFLOW from
+ INTEGER_CSTs.
+
+2008-11-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/38007
+ * c-common.c (c_common_signed_or_unsigned_type): Remove C++
+ special casing.
+
+2008-11-12 Anatoly Sokolov <aesok@post.ru>
+
+ * config/avr/avr.c (avr_mcu_t): Add atmega16hvb, atmega32hvb,
+ atmega4hvd, atmega8hvd, atmega64c1, atmega64m1, atmega16u4 and
+ atmega32u6 devices.
+ * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
+ * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
+
+2008-11-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc/config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Remove
+ packed-stack special handling.
+ (FRAME_ADDR_RTX): Add definition.
+
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/35366
+ * fold-const.c (native_encode_string): New function.
+ (native_encode_expr): Use it for STRING_CST.
+
+2008-11-12 DJ Delorie <dj@redhat.com>
+
+ * config/m32c/cond.md (cond_to_int peephole2): Don't eliminate the
+ insns if the intermediate value will be used later.
+
+2008-11-12 Andreas Schwab <schwab@suse.de>
+
+ * config/m68k/m68k.c (print_operand): Mask off extra extension
+ bits when writing out the representation of real values.
+
+2008-11-12 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/38079
+ * tree-vect-analyze.c (vect_analyze_data_refs): Replace dump_file
+ with vect_dump.
+
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35334
+ * c-pretty-print.c (pp_c_complex_expr): New function.
+ (pp_c_postfix_expression) <case COMPLEX_EXPR>: Call it.
+
+ PR target/35366
+ * expr.c (expand_expr_addr_expr_1): If EXP needs bigger alignment
+ than INNER and INNER is a constant, forcibly align INNER as much
+ as needed.
+
2008-11-11 Richard Sandiford <rdsandiford@googlemail.com>
* cse.c (fold_rtx): Remove redundant gen_rtx_CONST.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2008-11-10 20:51:02.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2008-11-13 01:24:29.000000000 +0000
@@ -1,3 +1,25 @@
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/36478
+ Revert:
+ 2007-05-07 Mike Stump <mrs@apple.com>
+ * parser.c (check_empty_body): Add.
+ (cp_parser_iteration_statement): Add call to check_empty_body.
+
+2008-11-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/38007
+ * typeck.c (cp_build_modify_expr): Update bitfield handling.
+
+2008-11-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34269
+ * parser.c (cp_parser_simple_declaration): Don't commit
+ to tentative parse if parse errors were seen.
+
+ PR c++/35334
+ * error.c (dump_expr): Handle COMPLEX_EXPR.
+
2008-11-10 Jakub Jelinek <jakub@redhat.com>
PR c++/38021
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.