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: Sat, 08 Sep 2007 14:30:19 +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: 7025k -> 7026k
Peak memory use before GGC: 1156k
Peak memory use after GGC: 1061k
Maximum of released memory in single GGC run: 122k
Garbage: 239k
Leak: 1077k
Overhead: 147k
GGC runs: 4
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7041k -> 7042k
Peak memory use before GGC: 1184k
Peak memory use after GGC: 1089k
Maximum of released memory in single GGC run: 123k
Garbage: 242k
Leak: 1109k
Overhead: 152k
GGC runs: 4
comparing empty function compilation at -O1 level:
Overall memory needed: 7081k -> 7082k
Peak memory use before GGC: 1156k
Peak memory use after GGC: 1053k
Maximum of released memory in single GGC run: 116k
Garbage: 241k
Leak: 1078k
Overhead: 148k -> 148k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7101k -> 7102k
Peak memory use before GGC: 1157k
Peak memory use after GGC: 1054k
Maximum of released memory in single GGC run: 117k
Garbage: 245k
Leak: 1079k
Overhead: 148k -> 148k
GGC runs: 3
comparing empty function compilation at -O3 level:
Overall memory needed: 7101k -> 7102k
Peak memory use before GGC: 1157k
Peak memory use after GGC: 1054k
Maximum of released memory in single GGC run: 117k
Garbage: 245k
Leak: 1079k
Overhead: 148k -> 148k
GGC runs: 3
comparing combine.c compilation at -O0 level:
Overall memory needed: 22049k -> 22050k
Peak memory use before GGC: 8292k
Peak memory use after GGC: 7631k
Maximum of released memory in single GGC run: 1581k
Garbage: 38803k
Leak: 6197k
Overhead: 5051k
GGC runs: 371
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24057k -> 24058k
Peak memory use before GGC: 10122k
Peak memory use after GGC: 9396k
Maximum of released memory in single GGC run: 1875k
Garbage: 39152k
Leak: 9036k
Overhead: 5723k
GGC runs: 344
comparing combine.c compilation at -O1 level:
Overall memory needed: 33137k -> 33138k
Peak memory use before GGC: 17037k
Peak memory use after GGC: 16838k
Maximum of released memory in single GGC run: 1379k
Garbage: 52335k
Leak: 6356k
Overhead: 6016k -> 6020k
GGC runs: 440
comparing combine.c compilation at -O2 level:
Overall memory needed: 35389k -> 35386k
Peak memory use before GGC: 17144k
Peak memory use after GGC: 16973k
Maximum of released memory in single GGC run: 1335k
Garbage: 71219k
Leak: 6674k
Overhead: 8271k -> 8275k
GGC runs: 507
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 6792k to 6800k, overall 0.12%
Overall memory needed: 39909k -> 39906k
Peak memory use before GGC: 17377k
Peak memory use after GGC: 17027k
Maximum of released memory in single GGC run: 2131k
Garbage: 92529k -> 92528k
Leak: 6792k -> 6800k
Overhead: 10697k -> 10702k
GGC runs: 539 -> 538
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 138493k -> 138498k
Peak memory use before GGC: 58645k
Peak memory use after GGC: 32139k
Maximum of released memory in single GGC run: 34143k
Garbage: 131577k
Leak: 8939k
Overhead: 14855k
GGC runs: 296
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 139753k -> 139750k
Peak memory use before GGC: 59795k
Peak memory use after GGC: 33288k
Maximum of released memory in single GGC run: 34144k
Garbage: 131805k
Leak: 10615k
Overhead: 15236k
GGC runs: 290
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 149589k -> 149606k
Peak memory use before GGC: 57143k
Peak memory use after GGC: 50913k
Maximum of released memory in single GGC run: 24232k
Garbage: 212473k
Leak: 9831k
Overhead: 24859k -> 24860k
GGC runs: 320
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 187377k -> 187374k
Peak memory use before GGC: 57777k
Peak memory use after GGC: 52506k
Maximum of released memory in single GGC run: 22944k
Garbage: 253708k
Leak: 10919k
Overhead: 30573k -> 30573k
GGC runs: 350
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 194397k -> 194398k
Peak memory use before GGC: 69770k
Peak memory use after GGC: 63203k
Maximum of released memory in single GGC run: 23329k
Garbage: 280470k
Leak: 10924k
Overhead: 32339k -> 32339k
GGC runs: 350
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 155200k -> 155165k
Peak memory use before GGC: 89693k
Peak memory use after GGC: 88800k
Maximum of released memory in single GGC run: 18062k
Garbage: 210298k
Leak: 52988k
Overhead: 26476k
GGC runs: 418
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 175460k -> 175461k
Peak memory use before GGC: 101997k
Peak memory use after GGC: 100987k
Maximum of released memory in single GGC run: 18268k
Garbage: 216154k
Leak: 75856k
Overhead: 32156k
GGC runs: 386
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121616k -> 121619k
Peak memory use before GGC: 88593k
Peak memory use after GGC: 87715k
Maximum of released memory in single GGC run: 17330k
Garbage: 296452k
Leak: 52239k
Overhead: 30692k -> 30720k
GGC runs: 515
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 127160k -> 127155k
Peak memory use before GGC: 88772k
Peak memory use after GGC: 87885k
Maximum of released memory in single GGC run: 17312k
Garbage: 363161k -> 363161k
Leak: 53321k -> 53321k
Overhead: 37858k -> 37887k
GGC runs: 590
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 131136k -> 131135k
Peak memory use before GGC: 89878k
Peak memory use after GGC: 88984k
Maximum of released memory in single GGC run: 17671k
Garbage: 390101k -> 390103k
Leak: 53569k
Overhead: 40245k -> 40275k
GGC runs: 609
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 379367k -> 379364k
Peak memory use before GGC: 101487k
Peak memory use after GGC: 57140k
Maximum of released memory in single GGC run: 50583k
Garbage: 179439k
Leak: 6289k
Overhead: 30886k
GGC runs: 107
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 380179k -> 380180k
Peak memory use before GGC: 102120k
Peak memory use after GGC: 57774k
Maximum of released memory in single GGC run: 50582k
Garbage: 179527k
Leak: 7997k
Overhead: 31352k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 294141k -> 294198k
Peak memory use before GGC: 80800k
Peak memory use after GGC: 73181k
Maximum of released memory in single GGC run: 40023k
Garbage: 235769k
Leak: 15627k
Overhead: 31950k -> 31951k
GGC runs: 105
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 270145k -> 270062k
Peak memory use before GGC: 78168k
Peak memory use after GGC: 73182k
Maximum of released memory in single GGC run: 33750k
Garbage: 245807k
Leak: 15716k
Overhead: 34175k -> 34176k
GGC runs: 118
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1017621k -> 1017626k
Peak memory use before GGC: 166810k
Peak memory use after GGC: 156373k
Maximum of released memory in single GGC run: 83494k
Garbage: 356756k
Leak: 25859k
Overhead: 46146k -> 46147k
GGC runs: 99
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-09-07 21:56:22.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-09-08 12:39:18.000000000 +0000
@@ -1,3 +1,46 @@
+2007-09-08 Richard Guenther <rguenther@suse.de>
+
+ * tree-cfg.c (verify_gimple_expr): Avoid building new
+ pointer types, use TYPE_POINTER_TO if available instead.
+
+2007-09-08 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/33329
+ PR target/26449
+ * config/i386/sse.md (mulv4si3): Do not expand sse2 sequence.
+ (*sse2_mulv4si3): New define_insn_and_split pattern. Split insn in
+ split1 pass.
+ (mulv16qi3): Implement as define_insn_and_split pattern instead of
+ define_expand, to split insn in split1 pass.
+ (mulv2di3): Ditto.
+
+2007-09-08 Dorit Nuzman <dorit@il.ibm.com>
+
+ PR tree-optimization/33301
+ * tree-vect-analyze (analyze_operations): Look at the type of the rhs
+ when relevant.
+
+2007-09-07 Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/32183
+ * Makefile.in (tree-ssa-reassoc.o): Also depend on $(CFGLOOP_H).
+
+ * tree-ssa-reassoc.c: Include cfgloop.h.
+ (is_reassociable_op): Add a loop argument and return true only
+ for inside loop.
+ (linearize_expr): Updated.
+ (should_break_up_subtract): Likewise.
+ (linearize_expr_tree): Likewise.
+ (init_reassoc): Call loop_optimizer_init with
+ AVOID_CFG_MODIFICATIONS. Remove calculate_dominance_info call
+ with CDI_DOMINATORS.
+ (fini_reassoc): Call loop_optimizer_finalize.
+
+2007-09-07 Sterling Augustine <sterling@tensilica.com>
+
+ * config/xtensa/lib2funcs.S (__xtensa_sync_caches): Use an ISYNC even
+ if there is no i-cache.
+
2007-09-07 Richard Guenther <rguenther@suse.de>
Reapply
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.