A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Mon May 30 15:31: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:
Overall memory needed: 24804k
Peak memory use before GGC: 9642k
Peak memory use after GGC: 8954k
Maximum of released memory in single GGC run: 2790k
Garbage: 42235k
Leak: 6693k
Overhead: 5844k
GGC runs: 329
comparing combine.c compilation at -O1 level:
Overall memory needed: 27616k -> 27596k
Peak memory use before GGC: 9148k
Peak memory use after GGC: 8709k
Maximum of released memory in single GGC run: 2203k
Garbage: 62901k -> 62894k
Leak: 7074k
Overhead: 7553k
GGC runs: 522 -> 521
comparing combine.c compilation at -O2 level:
Overall memory needed: 24800k
Peak memory use before GGC: 18268k
Peak memory use after GGC: 18081k
Maximum of released memory in single GGC run: 2523k
Garbage: 88065k -> 88049k
Leak: 7039k
Overhead: 10877k -> 10879k
GGC runs: 483
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7100k to 7128k, overall 0.39%
Overall memory needed: 25068k -> 25100k
Peak memory use before GGC: 18278k
Peak memory use after GGC: 18081k
Maximum of released memory in single GGC run: 3093k
Garbage: 117440k -> 117442k
Leak: 7100k -> 7128k
Overhead: 14424k -> 14425k
GGC runs: 538
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 85588k
Peak memory use before GGC: 73383k
Peak memory use after GGC: 45353k
Maximum of released memory in single GGC run: 37612k
Garbage: 153233k
Leak: 11531k
Overhead: 19577k
GGC runs: 268
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 101096k
Peak memory use before GGC: 76428k
Peak memory use after GGC: 65583k
Maximum of released memory in single GGC run: 37093k
Garbage: 302935k -> 302927k
Leak: 11592k
Overhead: 36643k -> 36643k
GGC runs: 382
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 154168k -> 154120k
Peak memory use before GGC: 118396k
Peak memory use after GGC: 93014k
Maximum of released memory in single GGC run: 32951k
Garbage: 404102k -> 404098k
Leak: 11434k
Overhead: 49975k
GGC runs: 306
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 154156k -> 154172k
Peak memory use before GGC: 118398k
Peak memory use after GGC: 93016k
Maximum of released memory in single GGC run: 32951k
Garbage: 404890k -> 404887k
Leak: 11455k
Overhead: 50097k
GGC runs: 312
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 127316k
Peak memory use before GGC: 103067k
Peak memory use after GGC: 102045k
Maximum of released memory in single GGC run: 21522k
Garbage: 247319k
Leak: 53785k
Overhead: 42785k
GGC runs: 346
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121424k
Peak memory use before GGC: 112510k
Peak memory use after GGC: 100687k
Maximum of released memory in single GGC run: 20025k
Garbage: 659417k -> 659385k
Leak: 58897k
Overhead: 83357k
GGC runs: 517
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 121404k
Peak memory use before GGC: 112510k
Peak memory use after GGC: 100687k
Maximum of released memory in single GGC run: 20025k
Garbage: 764740k -> 764681k
Leak: 59593k -> 59585k
Overhead: 102505k -> 102504k
GGC runs: 610
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 124356k
Peak memory use before GGC: 115252k
Peak memory use after GGC: 102513k
Maximum of released memory in single GGC run: 21385k
Garbage: 821248k -> 821207k
Leak: 60842k
Overhead: 108816k -> 108815k
GGC runs: 609
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-05-29 22:11:12.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-05-30 05:41:25.000000000 +0000
@@ -1,3 +1,12 @@
+2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
+
+ * tree-outof-ssa.c (_elim_graph): Change the type of edge_list
+ to VEC(int,heap)*.
+ (new_elim_graph, clear_elim_graph, delete_elim_graph,
+ elim_graph_add_edge, elim_graph_remove_succ_edge,
+ FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Use VEC
+ instead of VARRAY.
+
2005-05-29 Kazu Hirata <kazu@cs.umass.edu>
* cgraphunit.c, ipa-inline.c, loop-iv.c, modulo-sched.c,
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