This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch decreased 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: Sat, 15 Apr 2006 04:42:37 +0000
- Subject: A recent patch decreased 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: 25056k -> 25048k
Peak memory use before GGC: 9541k -> 9509k
Peak memory use after GGC: 8897k
Maximum of released memory in single GGC run: 2634k
Garbage: 38995k -> 38985k
Leak: 6734k -> 6687k
Overhead: 5887k -> 5959k
GGC runs: 304 -> 309
comparing combine.c compilation at -O1 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17430k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2300k
Garbage: 59777k
Leak: 6883k -> 6861k
Overhead: 7089k -> 7116k
GGC runs: 380
comparing combine.c compilation at -O2 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17435k
Peak memory use after GGC: 17251k
Maximum of released memory in single GGC run: 2395k
Garbage: 83745k -> 83745k
Leak: 6984k -> 6962k
Overhead: 9767k -> 9793k
GGC runs: 442
comparing combine.c compilation at -O3 level:
Overall memory needed: 25992k
Peak memory use before GGC: 18538k -> 18530k
Peak memory use after GGC: 17841k -> 17833k
Maximum of released memory in single GGC run: 3516k -> 3500k
Garbage: 114137k -> 114121k
Leak: 7083k -> 7061k
Overhead: 13320k -> 13361k
GGC runs: 497 -> 499
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation decreased from 9886k to 9518k, overall -3.87%
Overall memory needed: 82420k -> 82164k
Peak memory use before GGC: 69292k -> 69036k
Peak memory use after GGC: 44790k
Maximum of released memory in single GGC run: 36009k
Garbage: 141276k -> 141276k
Leak: 9886k -> 9518k
Overhead: 20392k -> 20524k
GGC runs: 239 -> 242
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 105348k -> 105332k
Peak memory use before GGC: 85353k -> 85337k
Peak memory use after GGC: 79201k -> 79185k
Maximum of released memory in single GGC run: 32286k
Garbage: 284671k
Leak: 10068k -> 9886k
Overhead: 33723k -> 33800k
GGC runs: 239
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 107872k -> 107856k
Peak memory use before GGC: 89766k -> 89750k
Peak memory use after GGC: 81655k -> 81639k
Maximum of released memory in single GGC run: 30736k
Garbage: 333353k -> 333354k
Leak: 10050k -> 9867k
Overhead: 41327k -> 41406k
GGC runs: 265
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 107980k -> 107964k
Peak memory use before GGC: 89792k -> 89776k
Peak memory use after GGC: 81681k -> 81665k
Maximum of released memory in single GGC run: 31062k
Garbage: 333965k -> 333963k
Leak: 10054k -> 9871k
Overhead: 41524k -> 41602k
GGC runs: 269
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118260k
Peak memory use before GGC: 95024k -> 95032k
Peak memory use after GGC: 94083k
Maximum of released memory in single GGC run: 20350k -> 20359k
Garbage: 218757k -> 218764k
Leak: 49516k -> 49504k
Overhead: 37281k -> 38051k
GGC runs: 363
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 115852k -> 115856k
Peak memory use before GGC: 97678k
Peak memory use after GGC: 96698k
Maximum of released memory in single GGC run: 18987k
Garbage: 464263k -> 464266k
Leak: 52806k -> 52782k
Overhead: 51417k -> 51584k
GGC runs: 509
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 115848k -> 115840k
Peak memory use before GGC: 97678k
Peak memory use after GGC: 96699k
Maximum of released memory in single GGC run: 18987k
Garbage: 553148k -> 553183k
Leak: 53697k -> 53673k
Overhead: 60184k -> 60345k
GGC runs: 589
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 117128k -> 117136k
Peak memory use before GGC: 98974k
Peak memory use after GGC: 97994k
Maximum of released memory in single GGC run: 19240k
Garbage: 573124k -> 573121k
Leak: 54053k -> 54031k
Overhead: 61192k -> 61315k
GGC runs: 599
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-04-14 12:09:45.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-04-15 03:28:21.000000000 +0000
@@ -1,3 +1,26 @@
+2006-04-14 Roger Sayle <roger@eyesopen.com>
+
+ * tree-cfg.c (make_edges, make_omp_sections_edges, move_stmt_r,
+ is_ctrl_altering_stmt): Reinstate RTH's changes from r112935 that
+ were accidentally reverted by r112959.
+
+2006-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/26823
+ * except.h (eh_region_outermost): New prototype.
+ * except.c (eh_region_outermost): New function.
+ * tree-cfg.c (find_outermost_region_in_block): Use it.
+
+2006-04-14 Kazu Hirata <kazu@codesourcery.com>
+
+ * local-alloc.c (rest_of_handle_local_alloc): Use VEC instead
+ of VARRAY.
+ * reload1.c (reg_equiv_memory_loc_varray): Rename to
+ reg_equiv_memory_loc_vec. Change the type to VEC(rtx,gc) *.
+ (init_reload, reload): Use VEC instead of VARRAY.
+ * reload.h: Update the prototype for
+ reg_equiv_memory_loc_varray.
+
2006-04-14 Alexey Starovoytov <alexey.starovoytov@sun.com>
Eric Botcazou <ebotcazou@libertysurf.fr>
@@ -43,7 +66,7 @@
2006-04-13 Richard Henderson <rth@redhat.com>
- PR 26651
+ PR libgomp/26651
* gimple-low.c (lower_omp_directive): Remove dead code.
(lower_stmt): Do nothing except for openmp, except for OMP_PARALLEL.
* gimplify.c (gimplify_expr): Update for OMP_RETURN, OMP_CONTINUE.
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.