A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Jun 23 16:51:00 GMT 2005
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:
Amount of produced GGC garbage increased from 42019k to 42113k, overall 0.22%
Amount of memory still referenced at the end of compilation increased from 6684k to 6700k, overall 0.24%
Overall memory needed: 24808k -> 24812k
Peak memory use before GGC: 9675k
Peak memory use after GGC: 9022k
Maximum of released memory in single GGC run: 2793k -> 2796k
Garbage: 42019k -> 42113k
Leak: 6684k -> 6700k
Overhead: 5769k -> 5769k
GGC runs: 338
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage increased from 64119k to 64256k, overall 0.21%
Overall memory needed: 16772k -> 16796k
Peak memory use before GGC: 9132k
Peak memory use after GGC: 8614k
Maximum of released memory in single GGC run: 2139k
Garbage: 64119k -> 64256k
Leak: 7143k
Overhead: 7992k -> 7994k
GGC runs: 529 -> 530
comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 86720k to 86855k, overall 0.16%
Overall memory needed: 24212k -> 24216k
Peak memory use before GGC: 17660k -> 17661k
Peak memory use after GGC: 17481k
Maximum of released memory in single GGC run: 2512k
Garbage: 86720k -> 86855k
Leak: 7168k
Overhead: 11007k -> 11008k
GGC runs: 493
comparing combine.c compilation at -O3 level:
Amount of produced GGC garbage increased from 115795k to 115941k, overall 0.13%
Overall memory needed: 24680k -> 24684k
Peak memory use before GGC: 17673k
Peak memory use after GGC: 17481k
Maximum of released memory in single GGC run: 3311k
Garbage: 115795k -> 115941k
Leak: 7280k -> 7264k
Overhead: 14764k -> 14764k
GGC runs: 540
comparing insn-attrtab.c compilation at -O0 level:
Peak amount of GGC memory allocated before garbage collecting increased from 70957k to 71243k, overall 0.40%
Amount of produced GGC garbage increased from 149562k to 150188k, overall 0.42%
Overall memory needed: 82972k
Peak memory use before GGC: 70957k -> 71243k
Peak memory use after GGC: 45264k
Maximum of released memory in single GGC run: 37012k -> 37298k
Garbage: 149562k -> 150188k
Leak: 11540k
Overhead: 18395k
GGC runs: 269
comparing insn-attrtab.c compilation at -O1 level:
Amount of produced GGC garbage increased from 293937k to 294872k, overall 0.32%
Overall memory needed: 98580k -> 98552k
Peak memory use before GGC: 72979k
Peak memory use after GGC: 62386k
Maximum of released memory in single GGC run: 36549k -> 36555k
Garbage: 293937k -> 294872k
Leak: 11640k
Overhead: 35882k -> 35882k
GGC runs: 384 -> 385
comparing insn-attrtab.c compilation at -O2 level:
Amount of produced GGC garbage increased from 389348k to 390283k, overall 0.24%
Overall memory needed: 155120k
Peak memory use before GGC: 116924k
Peak memory use after GGC: 87333k
Maximum of released memory in single GGC run: 33167k
Garbage: 389348k -> 390283k
Leak: 11500k
Overhead: 47838k
GGC runs: 309
comparing insn-attrtab.c compilation at -O3 level:
Amount of produced GGC garbage increased from 390151k to 391083k, overall 0.24%
Overall memory needed: 155096k -> 155104k
Peak memory use before GGC: 116926k
Peak memory use after GGC: 87335k
Maximum of released memory in single GGC run: 33167k
Garbage: 390151k -> 391083k
Leak: 11522k
Overhead: 47962k -> 47962k
GGC runs: 313
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of produced GGC garbage increased from 230980k to 231704k, overall 0.31%
Overall memory needed: 124848k
Peak memory use before GGC: 100704k -> 100701k
Peak memory use after GGC: 99705k -> 99703k
Maximum of released memory in single GGC run: 21538k -> 21535k
Garbage: 230980k -> 231704k
Leak: 53177k -> 53177k
Overhead: 40192k -> 40198k
GGC runs: 337 -> 338
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119232k -> 119224k
Peak memory use before GGC: 110049k -> 110036k
Peak memory use after GGC: 98630k -> 98627k
Maximum of released memory in single GGC run: 19969k -> 19967k
Garbage: 653957k -> 654409k
Leak: 58453k -> 58228k
Overhead: 89197k -> 89212k
GGC runs: 510 -> 514
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119232k -> 119224k
Peak memory use before GGC: 110050k -> 110036k
Peak memory use after GGC: 98630k -> 98628k
Maximum of released memory in single GGC run: 19969k -> 19966k
Garbage: 748283k -> 748416k
Leak: 59368k -> 59232k
Overhead: 106836k -> 106805k
GGC runs: 591 -> 588
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 121856k -> 121532k
Peak memory use before GGC: 112793k -> 112836k
Peak memory use after GGC: 100135k -> 99816k
Maximum of released memory in single GGC run: 21327k -> 21384k
Garbage: 807072k -> 807271k
Leak: 60524k -> 60544k
Overhead: 114486k -> 114453k
GGC runs: 594 -> 596
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-06-23 11:18:35.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-06-23 15:47:08.000000000 +0000
@@ -1,3 +1,35 @@
+2005-06-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/19317
+ Leave the return slot target in the MODIFY_EXPR rather than making
+ it an argument, but only use it if the CALL_EXPR has a flag set.
+ * tree.h (CALL_EXPR_HAS_RETURN_SLOT_ADDR): Rename to
+ CALL_EXPR_RETURN_SLOT_OPT.
+ * calls.c (expand_call): Adjust.
+ * tree-inline.c (expand_call_inline): Adjust.
+ * tree-pretty-print.c (dump_generic_node): Adjust.
+
+ And set the flag as appropriate.
+ * gimplify.c (gimplify_modify_expr_rhs): Set
+ CALL_EXPR_HAS_RETURN_SLOT_ADDR where the LHS is obviously safe.
+ * tree-nrv.c (execute_return_slot_opt): Set
+ CALL_EXPR_HAS_RETURN_SLOT_ADDR based on escape analysis.
+ * tree-pass.h: Declare pass_return_slot.
+ * tree-optimize.c (init_tree_optimization_passes): Add it.
+
+2005-06-23 David Edelsohn <edelsohn@gnu.org>
+
+ PR target/21760
+ * config/rs6000/rs6000.h (PPC405_ERRATUM77): New.
+ * config/rs6000/rs6000.md: Move atomic instructions to ...
+ * config/rs6000/sync.md: Here.
+ Change sync_compare_and_swap<mode> to define_expand. All stwcx
+ patterns test PPC405_ERRATUM77.
+
+2005-06-23 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (copy_body_r): Remap labels correctly.
+
2005-06-22 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/sysv4.h (TARGET_ASM_EXCEPTION_SECTION): Delete.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-06-23 00:44:21.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-06-23 15:47:15.000000000 +0000
@@ -1,3 +1,9 @@
+2005-06-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/19317
+ * semantics.c (simplify_aggr_init_expr): Use
+ CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
+
2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* pt.c (register_specialization): Remove superfluous assertion.
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