A recent patch decreased GCC's memory consumption.
gcctest@suse.de
gcctest@suse.de
Wed Jan 17 15:12:00 GMT 2007
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 empty function compilation at -O0 level:
Overall memory needed: 18349k
Peak memory use before GGC: 2264k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 309k
Garbage: 444k
Leak: 2288k
Overhead: 455k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18365k
Peak memory use before GGC: 2291k
Peak memory use after GGC: 1982k
Maximum of released memory in single GGC run: 309k
Garbage: 447k
Leak: 2320k
Overhead: 460k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18457k
Peak memory use before GGC: 2264k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 309k
Garbage: 450k
Leak: 2291k
Overhead: 456k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18469k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 453k
Leak: 2291k
Overhead: 456k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18469k
Peak memory use before GGC: 2265k
Peak memory use after GGC: 1955k
Maximum of released memory in single GGC run: 310k
Garbage: 453k
Leak: 2291k
Overhead: 456k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28633k
Peak memory use before GGC: 9312k
Peak memory use after GGC: 8864k
Maximum of released memory in single GGC run: 2606k
Garbage: 37297k
Leak: 6538k
Overhead: 4829k
GGC runs: 276
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 30681k
Peak memory use before GGC: 10895k
Peak memory use after GGC: 10524k
Maximum of released memory in single GGC run: 2365k
Garbage: 37870k
Leak: 9414k
Overhead: 5530k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory needed: 33270k
Peak memory use before GGC: 19924k
Peak memory use after GGC: 19725k
Maximum of released memory in single GGC run: 2264k
Garbage: 55193k
Leak: 6566k
Overhead: 9959k
GGC runs: 352
comparing combine.c compilation at -O2 level:
Overall memory needed: 33274k
Peak memory use before GGC: 19933k
Peak memory use after GGC: 19735k
Maximum of released memory in single GGC run: 2206k
Garbage: 70931k
Leak: 6694k
Overhead: 11862k
GGC runs: 410
comparing combine.c compilation at -O3 level:
Overall memory needed: 32470k
Peak memory use before GGC: 20881k
Peak memory use after GGC: 20311k
Maximum of released memory in single GGC run: 3125k
Garbage: 103323k
Leak: 6768k
Overhead: 16334k
GGC runs: 470
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 89190k
Peak memory use before GGC: 70731k
Peak memory use after GGC: 44750k
Maximum of released memory in single GGC run: 37355k
Garbage: 131553k
Leak: 9580k
Overhead: 16626k
GGC runs: 210
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 90366k
Peak memory use before GGC: 71893k
Peak memory use after GGC: 46017k
Maximum of released memory in single GGC run: 37357k
Garbage: 132717k
Leak: 11269k
Overhead: 17020k
GGC runs: 209
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 98154k
Peak memory use before GGC: 72561k
Peak memory use after GGC: 68716k
Maximum of released memory in single GGC run: 31302k
Garbage: 227951k
Leak: 9397k
Overhead: 29388k
GGC runs: 223
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 105158k
Peak memory use before GGC: 79387k
Peak memory use after GGC: 73577k
Maximum of released memory in single GGC run: 29594k
Garbage: 279218k
Leak: 9395k
Overhead: 35694k
GGC runs: 245
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 109994k
Peak memory use before GGC: 79427k
Peak memory use after GGC: 73617k
Maximum of released memory in single GGC run: 29758k
Garbage: 279917k
Leak: 9399k
Overhead: 35905k
GGC runs: 245
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119778k
Peak memory use before GGC: 93022k
Peak memory use after GGC: 92099k
Maximum of released memory in single GGC run: 18912k
Garbage: 208221k
Leak: 49015k
Overhead: 21199k
GGC runs: 407
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 132278k
Peak memory use before GGC: 105299k
Peak memory use after GGC: 104254k
Maximum of released memory in single GGC run: 18752k
Garbage: 214808k
Leak: 72442k
Overhead: 27104k
GGC runs: 382
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 130334k
Peak memory use before GGC: 98685k
Peak memory use after GGC: 97707k
Maximum of released memory in single GGC run: 17925k
Garbage: 395085k
Leak: 50038k
Overhead: 53237k
GGC runs: 572
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 130394k
Peak memory use before GGC: 98752k
Peak memory use after GGC: 97773k
Maximum of released memory in single GGC run: 17924k
Garbage: 452204k
Leak: 50820k
Overhead: 46371k
GGC runs: 632
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 132210k -> 132214k
Peak memory use before GGC: 100342k
Peak memory use after GGC: 99308k
Maximum of released memory in single GGC run: 18325k
Garbage: 467189k
Leak: 51028k
Overhead: 45791k
GGC runs: 642
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137646k
Peak memory use before GGC: 81607k
Peak memory use after GGC: 58487k
Maximum of released memory in single GGC run: 44559k
Garbage: 148154k
Leak: 8080k
Overhead: 25066k
GGC runs: 81
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138198k
Peak memory use before GGC: 82253k
Peak memory use after GGC: 59133k
Maximum of released memory in single GGC run: 44208k
Garbage: 148325k
Leak: 9335k
Overhead: 25561k
GGC runs: 89
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 436694k -> 436618k
Peak memory use before GGC: 202594k
Peak memory use after GGC: 192571k
Maximum of released memory in single GGC run: 137171k
Garbage: 278226k
Leak: 29804k
Overhead: 32030k
GGC runs: 92
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 367434k -> 365202k
Peak memory use before GGC: 207227k
Peak memory use after GGC: 192563k
Maximum of released memory in single GGC run: 140362k
Garbage: 355277k
Leak: 30387k
Overhead: 47185k
GGC runs: 98
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Ovarall memory allocated via mmap and sbrk decreased from 710702k to 572546k, overall -24.13%
Overall memory needed: 710702k -> 572546k
Peak memory use before GGC: 282245k
Peak memory use after GGC: 273215k
Maximum of released memory in single GGC run: 138326k
Garbage: 448504k
Leak: 45440k
Overhead: 56089k
GGC runs: 97
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-01-16 04:54:44.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-01-16 20:23:49.000000000 +0000
@@ -1,3 +1,60 @@
+2007-01-16 Janis Johnson <janis187@us.ibm.com>
+
+ * config/dfp-bit.c (dfp_compare_op): Return separate value for NaN.
+ (DFP_NE, DFP_LE, DFP_GE): Return false for NaN.
+
+2007-01-16 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/darwin-ldouble.c: Build file for SOFT_FLOAT.
+ (strong_alias): Define.
+ (__gcc_qmul): Provide non-FMA for soft-float.
+ (__gcc_qdiv): Same.
+ (__gcc_qneg): New.
+ (__gcc_qeq): New.
+ (__gcc_qle): New.
+ (__gcc_qge): New.
+ (__gcc_qunord): New.
+ (__gcc_stoq): New.
+ (__gcc_dtoq): New.
+ (__gcc_qtos): New.
+ (__gcc_qtod): New.
+ (__gcc_qtoi): New.
+ (__gcc_qtou): New.
+ (__gcc_itoq): New.
+ (__gcc_utoq): New.
+ (fmsub): New.
+ * config/rs6000/rs6000.c (rs6000_init_libfuncs): Initialize
+ soft-float functions.
+ * config/rs6000/libgcc-ppc-glibc.ver: Version soft-float symbols.
+ * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Do not warn
+ about long double soft float.
+
+2007-01-16 Dorit Nuzman <dorit@il.ibm.com>
+ Tehila Meyzels <tehila@il.ibm.com>
+
+ * tree-vectorizer.h (is_pattern_stmt_p): New.
+ * tree-vect-analyze.c (vect_determine_vectorization_factor): Fix
+ formatting (tabs instead of spaces). Cleanup and clarify setting
+ of STMT_VINFO_VECTYPE. Call is_pattern_stmt_p.
+ * tree-vect-transform.c (vect_get_vec_def_for_operand): Fix typo.
+ (vectorizable_type_demotion): Check that types are integral.
+ (vectorizable_type_promotion): Likewise.
+ (vectorizable_store): Fix typo. Eliminate new-line at end of
+ comments.
+
+2007-01-16 Jan Hubicka <jh@suse.cz>
+
+ * tree-ssanames.c (release_dead_ssa_names): Remove invalidated
+ cgraph edges too.
+
+2007-01-15 Eric Christopher <echristo@apple.com>
+
+ * ifcvt.c: Include vec.h, vecprim.h.
+ (check_cond_move_block): New argument regs.
+ Reorganize. Add registers used to regs.
+ (cond_move_process_if_block): Use regs set above as
+ loop bounds.
+
2007-01-15 Eric Christopher <echristo@apple.com>
* config/darwin.h: Update copyright.
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