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: Tue, 18 Oct 2005 19:04:56 +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 combine.c compilation at -O0 level:
Overall memory needed: 24881k
Peak memory use before GGC: 9593k
Peak memory use after GGC: 8941k
Maximum of released memory in single GGC run: 2736k
Garbage: 40095k
Leak: 6702k
Overhead: 5787k
GGC runs: 317
comparing combine.c compilation at -O1 level:
Overall memory needed: 26816k
Peak memory use before GGC: 17361k
Peak memory use after GGC: 17177k
Maximum of released memory in single GGC run: 2372k
Garbage: 60634k
Leak: 6892k
Overhead: 7580k
GGC runs: 387
comparing combine.c compilation at -O2 level:
Overall memory needed: 26816k
Peak memory use before GGC: 17364k
Peak memory use after GGC: 17178k
Maximum of released memory in single GGC run: 2452k
Garbage: 77746k
Leak: 6978k
Overhead: 10055k
GGC runs: 457
comparing combine.c compilation at -O3 level:
Overall memory needed: 26816k
Peak memory use before GGC: 18364k
Peak memory use after GGC: 17994k
Maximum of released memory in single GGC run: 3507k
Garbage: 111061k
Leak: 7073k
Overhead: 13875k
GGC runs: 521
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80920k
Peak memory use before GGC: 69468k
Peak memory use after GGC: 45006k
Maximum of released memory in single GGC run: 36247k
Garbage: 146344k
Leak: 10095k
Overhead: 19790k
GGC runs: 251
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 111692k
Peak memory use before GGC: 94036k
Peak memory use after GGC: 83553k
Maximum of released memory in single GGC run: 32588k
Garbage: 289752k
Leak: 10072k
Overhead: 36662k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 127128k
Peak memory use before GGC: 113347k
Peak memory use after GGC: 83466k
Maximum of released memory in single GGC run: 32177k
Garbage: 372186k
Leak: 10176k
Overhead: 48197k
GGC runs: 274
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 127184k
Peak memory use before GGC: 113372k
Peak memory use after GGC: 83491k
Maximum of released memory in single GGC run: 32501k
Garbage: 372769k
Leak: 10181k
Overhead: 48348k
GGC runs: 277
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118164k -> 118236k
Peak memory use before GGC: 94931k -> 94986k
Peak memory use after GGC: 93990k -> 94039k
Maximum of released memory in single GGC run: 20288k -> 20383k
Garbage: 226052k -> 222798k
Leak: 49162k -> 49144k
Overhead: 36818k -> 36634k
GGC runs: 372 -> 369
comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak amount of GGC memory still allocated after garbage collectin increased from 92624k to 93047k, overall 0.46%
Overall memory needed: 105796k -> 105756k
Peak memory use before GGC: 95226k -> 95126k
Peak memory use after GGC: 92624k -> 93047k
Maximum of released memory in single GGC run: 20357k -> 20273k
Garbage: 570447k -> 567017k
Leak: 54982k -> 54965k
Overhead: 67771k -> 67586k
GGC runs: 522 -> 518
comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak amount of GGC memory still allocated after garbage collectin increased from 92624k to 93047k, overall 0.46%
Overall memory needed: 106384k -> 106332k
Peak memory use before GGC: 95226k -> 95127k
Peak memory use after GGC: 92624k -> 93047k
Maximum of released memory in single GGC run: 20356k -> 20274k
Garbage: 656806k -> 653431k
Leak: 55776k -> 55742k
Overhead: 79363k -> 79167k
GGC runs: 588 -> 585
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108772k -> 108868k
Peak memory use before GGC: 96517k -> 96590k
Peak memory use after GGC: 94566k -> 94125k
Maximum of released memory in single GGC run: 20676k -> 20766k
Garbage: 711863k -> 708339k
Leak: 56953k -> 56934k
Overhead: 84361k -> 84168k
GGC runs: 601 -> 597
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-10-18 07:44:39.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-10-18 17:55:29.000000000 +0000
@@ -1,3 +1,31 @@
+2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/22293
+ * decl.c (grokdeclarator): Reject unqualified destructors in
+ friend declarations.
+
+2005-10-18 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/23293
+ * pt.c (convert_template_argument): Use canonical type variants in
+ template specializations.
+
+2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/21383
+ * name-lookup.c (arg_assoc): Template args can be null in a
+ template-id-expr.
+
+ PR c++/22604
+ * class.c (update_vtable_entry_for_fn): Don't process invalid
+ covariant overriders.
+
+ PR c++/23118
+ * cp-tree.h (add_method): Add return value.
+ * class.c (add_method): Return success indicator.
+ * semantics.c (finish_member_declaration): Don't add an invalid
+ method to the method list.
+
2005-10-17 Mark Mitchell <mark@codesourcery.com>
PR c++/21908
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.