This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased 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: Tue, 31 Jan 2006 21:48:48 +0000
- Subject: A recent patch increased 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:
Peak amount of GGC memory allocated before garbage collecting increased from 9553k to 9566k, overall 0.14%
Peak amount of GGC memory still allocated after garbage collectin increased from 8901k to 8913k, overall 0.13%
Amount of memory still referenced at the end of compilation increased from 6728k to 6740k, overall 0.18%
Overall memory needed: 25305k -> 25324k
Peak memory use before GGC: 9553k -> 9566k
Peak memory use after GGC: 8901k -> 8913k
Maximum of released memory in single GGC run: 2649k
Garbage: 40059k -> 40060k
Leak: 6728k -> 6740k
Overhead: 5736k -> 5738k
GGC runs: 313
comparing combine.c compilation at -O1 level:
Overall memory needed: 26884k -> 26892k
Peak memory use before GGC: 17423k -> 17434k
Peak memory use after GGC: 17243k -> 17255k
Maximum of released memory in single GGC run: 2310k -> 2309k
Garbage: 62581k -> 62568k
Leak: 6877k -> 6881k
Overhead: 7484k -> 7485k
GGC runs: 393
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 6948k to 6968k, overall 0.29%
Overall memory needed: 26884k -> 26892k
Peak memory use before GGC: 17426k -> 17436k
Peak memory use after GGC: 17244k -> 17255k
Maximum of released memory in single GGC run: 2389k -> 2388k
Garbage: 79995k -> 79972k
Leak: 6948k -> 6968k
Overhead: 10012k -> 10012k
GGC runs: 448
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7026k to 7038k, overall 0.17%
Overall memory needed: 26884k -> 26892k
Peak memory use before GGC: 18263k -> 18273k
Peak memory use after GGC: 17941k -> 17952k
Maximum of released memory in single GGC run: 3378k
Garbage: 111250k -> 111230k
Leak: 7026k -> 7038k
Overhead: 13694k -> 13694k
GGC runs: 502
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 10119k to 10131k, overall 0.12%
Overall memory needed: 80932k -> 80948k
Peak memory use before GGC: 69495k -> 69508k
Peak memory use after GGC: 45032k -> 45044k
Maximum of released memory in single GGC run: 36220k
Garbage: 146441k -> 146427k
Leak: 10119k -> 10131k
Overhead: 19749k -> 19750k
GGC runs: 247
comparing insn-attrtab.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 10042k to 10054k, overall 0.12%
Overall memory needed: 109152k -> 109164k
Peak memory use before GGC: 91964k -> 91973k
Peak memory use after GGC: 81062k -> 81071k
Maximum of released memory in single GGC run: 32143k
Garbage: 296324k -> 296337k
Leak: 10042k -> 10054k
Overhead: 36075k -> 36077k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 10144k to 10156k, overall 0.12%
Overall memory needed: 122544k -> 122560k
Peak memory use before GGC: 109346k -> 109356k
Peak memory use after GGC: 80963k -> 80974k
Maximum of released memory in single GGC run: 31578k
Garbage: 380310k -> 380308k
Leak: 10144k -> 10156k
Overhead: 47727k -> 47729k
GGC runs: 274
comparing insn-attrtab.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 10148k to 10160k, overall 0.12%
Overall memory needed: 122596k -> 122608k
Peak memory use before GGC: 109373k -> 109384k
Peak memory use after GGC: 80991k -> 81001k
Maximum of released memory in single GGC run: 31906k -> 31908k
Garbage: 380923k -> 380919k
Leak: 10148k -> 10160k
Overhead: 47928k -> 47930k
GGC runs: 276
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118236k -> 118252k
Peak memory use before GGC: 95015k -> 95027k
Peak memory use after GGC: 94067k -> 94080k
Maximum of released memory in single GGC run: 20299k
Garbage: 223498k -> 223500k
Leak: 49456k -> 49470k
Overhead: 37086k -> 37088k
GGC runs: 369
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 108388k -> 108428k
Peak memory use before GGC: 95130k -> 95143k
Peak memory use after GGC: 93139k -> 93151k
Maximum of released memory in single GGC run: 20158k
Garbage: 564020k -> 564040k
Leak: 52234k -> 52248k
Overhead: 63604k -> 63608k
GGC runs: 532
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 108524k -> 108536k
Peak memory use before GGC: 95131k -> 95143k
Peak memory use after GGC: 93139k -> 93152k
Maximum of released memory in single GGC run: 20158k
Garbage: 657613k -> 655293k
Leak: 53052k -> 53066k
Overhead: 75239k -> 75038k
GGC runs: 597 -> 598
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 110764k -> 110784k
Peak memory use before GGC: 96525k -> 96537k
Peak memory use after GGC: 94567k -> 94579k
Maximum of released memory in single GGC run: 20583k -> 20582k
Garbage: 713924k -> 713909k
Leak: 53941k -> 53955k
Overhead: 79320k -> 79299k
GGC runs: 611 -> 609
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-01-31 10:19:20.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-01-31 20:39:24.000000000 +0000
@@ -1,3 +1,42 @@
+2006-01-31 Nicolas Pitre <nico@cam.org>
+
+ * arm.md (smaxsi3): Make aware of smax_m1.
+ (smax_m1): New.
+
+2006-01-31 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gcc/config/m68k/lb1sf68.asm: Use moveq to load small constants.
+
+2006-01-31 Richard Guenther <rguenther@suse.de>
+
+ * doc/invoke.texi (-msselibm): Document.
+ * target.h (expand_library_builtin): New target hook.
+ * builtins.c (expand_builtin): Use expand_library_builtin.
+ (default_expand_library_builtin): New function.
+ * gcc.c (LINK_GCC_MATH_SPEC): Define.
+ (LINK_COMMAND_SPEC): Handle %(link_gcc_math).
+ (link_gcc_math_spec): Declare.
+ (static_specs): Add link_gcc_math_spec.
+ * expr.h (default_expand_library_builtin): Declare.
+ * target-def.h (TARGET_EXPAND_LIBRARY_BUILTIN): Define.
+ (TARGET_INITIALIZER): Add TARGET_EXPAND_LIBRARY_BUILTIN.
+ * config/i386/i386.h: Provide LINK_GCC_MATH_SPEC.
+ * config/i386/i386.opt (msselibm): New target option.
+ * config/i386/i386.c (ix86_builtin_function_variants): New array.
+ (ix86_init_sse_abi_builtins): New function.
+ (ix86_expand_library_builtin): Likewise.
+ (TARGET_EXPAND_LIBRARY_BUILTIN): Define.
+ (override_options): Handle error conditions wrt -msselibm.
+ (ix86_builtins): Add function codes for SSE2 ABI builtins.
+ (ix86_init_builtins): Call ix86_init_sse_abi_builtins.
+ * doc/extend.texi (__builtin_sse2_*): Document new target specific
+ builtins.
+
+2006-01-31 Richard Guenther <rguenther@suse.de>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/install.texi (--disable-libgcc-math): Document.
+
2006-01-30 Marcin Dalecki <martin@dalecki.de>
* expr.h (expand_normal): new inline function.
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.