GCC memory consumption decreased by recent patch
gcctest@suse.de
gcctest@suse.de
Sat Mar 12 12:50:00 GMT 2005
Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:
comparing combine.c compilation at -O0 level:
Overall memory needed: 24665k
Peak memory use before GGC: 9358k
Peak memory use after GGC: 8672k
Maximum of released memory in single GGC run: 2864k
Garbage: 41686k
Leak: 6394k
Overhead: 5770k
GGC runs: 327
comparing combine.c compilation at -O1 level:
Overall memory needed: 24477k -> 24485k
Peak memory use before GGC: 8667k
Peak memory use after GGC: 8093k
Maximum of released memory in single GGC run: 2021k
Garbage: 58308k
Leak: 6753k
Overhead: 9834k
GGC runs: 501
comparing combine.c compilation at -O2 level:
Overall memory needed: 28885k -> 28889k
Peak memory use before GGC: 12670k
Peak memory use after GGC: 12544k
Maximum of released memory in single GGC run: 2596k
Garbage: 78894k
Leak: 6589k
Overhead: 14262k
GGC runs: 522
comparing combine.c compilation at -O3 level:
Overall memory needed: 30789k -> 30805k
Peak memory use before GGC: 12715k
Peak memory use after GGC: 12544k
Maximum of released memory in single GGC run: 3423k
Garbage: 106697k
Leak: 7195k
Overhead: 19107k
GGC runs: 583
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 114212k
Peak memory use before GGC: 74821k
Peak memory use after GGC: 45493k
Maximum of released memory in single GGC run: 39414k
Garbage: 152812k
Leak: 10983k
Overhead: 19968k
GGC runs: 273
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 124760k -> 124436k
Peak memory use before GGC: 78641k
Peak memory use after GGC: 70035k
Maximum of released memory in single GGC run: 40773k
Garbage: 369231k
Leak: 11360k
Overhead: 71914k
GGC runs: 400
comparing insn-attrtab.c compilation at -O2 level:
Ovarall memory allocated via mmap and sbrk decreased from 147448k to 137772k, overall -7.02%
Overall memory needed: 147448k -> 137772k
Peak memory use before GGC: 97673k
Peak memory use after GGC: 83493k
Maximum of released memory in single GGC run: 39453k
Garbage: 489762k
Leak: 11240k
Overhead: 87471k
GGC runs: 343
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 148972k
Peak memory use before GGC: 97675k
Peak memory use after GGC: 83495k
Maximum of released memory in single GGC run: 39453k
Garbage: 490574k
Leak: 11277k
Overhead: 87601k
GGC runs: 349
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 111956k
Peak memory use before GGC: 87327k
Peak memory use after GGC: 85902k
Maximum of released memory in single GGC run: 19511k
Garbage: 246348k
Leak: 55514k
Overhead: 43272k
GGC runs: 366
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 104037k -> 104029k
Peak memory use before GGC: 86185k
Peak memory use after GGC: 85120k
Maximum of released memory in single GGC run: 18950k
Garbage: 435007k
Leak: 56860k
Overhead: 65155k
GGC runs: 513
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 104253k
Peak memory use before GGC: 86185k
Peak memory use after GGC: 85121k
Maximum of released memory in single GGC run: 18950k
Garbage: 477960k
Leak: 57428k
Overhead: 75178k
GGC runs: 568
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 105353k
Peak memory use before GGC: 87324k
Peak memory use after GGC: 86200k
Maximum of released memory in single GGC run: 19399k
Garbage: 483127k
Leak: 57613k
Overhead: 75845k
GGC runs: 558
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-03-12 07:08:26.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-03-12 11:50:11.000000000 +0000
@@ -1,3 +1,8 @@
+2005-03-12 Geoffrey Keating <geoffk@apple.com>
+
+ * c-lex.c (c_lex_with_flags): Add parameter to call to
+ cpp_spell_token.
+
2005-03-11 Per Bothner <per@bothner.com>
* c-tree.h (struct c_declarator): New id_loc field.
I am friendly script caring about memory consumption in GCC. Please contact
jh@suse.cz if something is going wrong.
The results can be reproduced by building 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.
Yours testing script.
More information about the Gcc-regression
mailing list