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, 03 Aug 2006 09:22:52 +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: 24721k
Peak memory use before GGC: 9160k
Peak memory use after GGC: 8547k
Maximum of released memory in single GGC run: 2580k
Garbage: 38214k
Leak: 6052k
Overhead: 5326k
GGC runs: 307
comparing combine.c compilation at -O1 level:
Overall memory needed: 36121k
Peak memory use before GGC: 16999k
Peak memory use after GGC: 16828k
Maximum of released memory in single GGC run: 2261k
Garbage: 56528k
Leak: 6066k
Overhead: 6069k
GGC runs: 378
comparing combine.c compilation at -O2 level:
Overall memory needed: 26496k
Peak memory use before GGC: 16997k
Peak memory use after GGC: 16828k
Maximum of released memory in single GGC run: 2254k
Garbage: 80296k
Leak: 6170k
Overhead: 8599k
GGC runs: 446
comparing combine.c compilation at -O3 level:
Overall memory needed: 25600k
Peak memory use before GGC: 18087k
Peak memory use after GGC: 17424k
Maximum of released memory in single GGC run: 3329k
Garbage: 109814k
Leak: 6247k
Overhead: 11868k
GGC runs: 493
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 81376k
Peak memory use before GGC: 68248k
Peak memory use after GGC: 43996k
Maximum of released memory in single GGC run: 35708k
Garbage: 138286k
Leak: 9116k
Overhead: 18992k
GGC runs: 241
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 103676k
Peak memory use before GGC: 83566k
Peak memory use after GGC: 77686k
Maximum of released memory in single GGC run: 31934k
Garbage: 268544k
Leak: 8940k
Overhead: 29968k
GGC runs: 235
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 103652k
Peak memory use before GGC: 87827k
Peak memory use after GGC: 79920k
Maximum of released memory in single GGC run: 30382k
Garbage: 314655k
Leak: 8935k
Overhead: 36951k
GGC runs: 263
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 103660k
Peak memory use before GGC: 87853k
Peak memory use after GGC: 79946k
Maximum of released memory in single GGC run: 30573k
Garbage: 315246k
Leak: 8938k
Overhead: 37130k
GGC runs: 267
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 116488k -> 116504k
Peak memory use before GGC: 92791k
Peak memory use after GGC: 91863k -> 91868k
Maximum of released memory in single GGC run: 19688k
Garbage: 214071k -> 214070k
Leak: 47149k -> 47149k
Overhead: 22165k -> 22165k
GGC runs: 416
comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak amount of GGC memory allocated before garbage collecting increased from 95347k to 97241k, overall 1.99%
Peak amount of GGC memory still allocated after garbage collectin increased from 93607k to 95100k, overall 1.59%
Amount of produced GGC garbage increased from 435585k to 447374k, overall 2.71%
Amount of memory still referenced at the end of compilation increased from 48579k to 49093k, overall 1.06%
Overall memory needed: 113996k -> 114908k
Peak memory use before GGC: 95347k -> 97241k
Peak memory use after GGC: 93607k -> 95100k
Maximum of released memory in single GGC run: 18450k -> 18447k
Garbage: 435585k -> 447374k
Leak: 48579k -> 49093k
Overhead: 31516k -> 32322k
GGC runs: 560 -> 561
comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 95348k to 97243k, overall 1.99%
Peak amount of GGC memory still allocated after garbage collectin increased from 93608k to 95101k, overall 1.59%
Amount of produced GGC garbage increased from 520535k to 531921k, overall 2.19%
Amount of memory still referenced at the end of compilation increased from 49266k to 49804k, overall 1.09%
Overall memory needed: 113948k -> 114940k
Peak memory use before GGC: 95348k -> 97243k
Peak memory use after GGC: 93608k -> 95101k
Maximum of released memory in single GGC run: 18451k -> 18448k
Garbage: 520535k -> 531921k
Leak: 49266k -> 49804k
Overhead: 39231k -> 40220k
GGC runs: 634 -> 638
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 96657k to 98676k, overall 2.09%
Peak amount of GGC memory still allocated after garbage collectin increased from 94896k to 96381k, overall 1.56%
Amount of produced GGC garbage increased from 537563k to 552961k, overall 2.86%
Amount of memory still referenced at the end of compilation increased from 49590k to 50120k, overall 1.07%
Overall memory needed: 115284k -> 117280k
Peak memory use before GGC: 96657k -> 98676k
Peak memory use after GGC: 94896k -> 96381k
Maximum of released memory in single GGC run: 18758k -> 18759k
Garbage: 537563k -> 552961k
Leak: 49590k -> 50120k
Overhead: 40305k -> 41360k
GGC runs: 650 -> 652
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 146456k
Peak memory use before GGC: 95412k
Peak memory use after GGC: 58507k
Maximum of released memory in single GGC run: 45493k
Garbage: 163295k
Leak: 7142k
Overhead: 29023k
GGC runs: 87
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 428092k
Peak memory use before GGC: 201177k
Peak memory use after GGC: 196171k
Maximum of released memory in single GGC run: 100203k
Garbage: 279192k
Leak: 47195k
Overhead: 31458k
GGC runs: 105
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 349816k
Peak memory use before GGC: 208293k
Peak memory use after GGC: 196536k
Maximum of released memory in single GGC run: 101565k
Garbage: 394885k
Leak: 47778k
Overhead: 49054k
GGC runs: 111
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 777924k
Peak memory use before GGC: 314602k
Peak memory use after GGC: 292946k
Maximum of released memory in single GGC run: 163430k
Garbage: 494442k
Leak: 65110k
Overhead: 60248k
GGC runs: 100
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2006-08-02 04:56:21.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2006-08-03 06:20:50.000000000 +0000
@@ -1,3 +1,31 @@
+2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/27508
+ * parser.c (cp_parser_unqualified_id): Check for invalid scopes
+ when parsing destructor names.
+
+ PR c++/28274
+ * decl.c (duplicate_decls): Call check_default_args here.
+ (start_preparsed_function): Do not call check_default_args.
+ * name-lookup.c (pushdecl_maybe_friend): Only call
+ check_default_args if duplicate_decls got bypassed.
+
+2006-08-02 Richard Guenther <rguenther@suse.de>
+
+ PR c++/28479
+ Revert
+ 2006-07-05 Richard Guenther <rguenther@suse.de>
+ Andrew Pinski <pinskia@gcc.gnu.org>
+
+ PR c++/27084
+ * cp-objcp-common.c (cxx_types_compatible_p): Ignore
+ top level qualifiers for pointer type comparisons.
+
+2006-08-02 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/28557
+ * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
+
2006-07-31 Mark Mitchell <mark@codesourcery.com>
PR c++/28523
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.