This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
GCC memory consumption increased by recent patch!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Wed, 22 Sep 2004 21:26:40 +0000
- Subject: GCC memory consumption increased by recent patch!
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: 24113k
Peak memory use before GGC: 9295k
Peak memory use after GGC: 8606k
Maximum of released memory in single GGC run: 2870k
Garbage: 42610k
Leak: 6105k
Overhead: 5587k
GGC runs: 364
comparing combine.c compilation at -O1 level:
Overall memory needed: 25561k
Peak memory use before GGC: 9375k
Peak memory use after GGC: 8797k
Maximum of released memory in single GGC run: 2030k
Garbage: 68672k
Leak: 6671k
Overhead: 11044k
GGC runs: 578
comparing combine.c compilation at -O2 level:
Overall memory needed: 28869k
Peak memory use before GGC: 12771k
Peak memory use after GGC: 12612k
Maximum of released memory in single GGC run: 2521k
Garbage: 83753k
Leak: 6425k
Overhead: 15589k
GGC runs: 572
comparing combine.c compilation at -O3 level:
Overall memory needed: 20564k
Peak memory use before GGC: 13015k
Peak memory use after GGC: 12692k
Maximum of released memory in single GGC run: 3360k
Garbage: 111476k
Leak: 6943k
Overhead: 20622k
GGC runs: 640
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 116476k
Peak memory use before GGC: 77100k
Peak memory use after GGC: 45185k
Maximum of released memory in single GGC run: 42129k
Garbage: 159513k
Leak: 10643k
Overhead: 19805k
GGC runs: 310
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 132920k
Peak memory use before GGC: 93160k
Peak memory use after GGC: 71527k
Maximum of released memory in single GGC run: 41234k
Garbage: 452497k
Leak: 11076k
Overhead: 73595k
GGC runs: 462
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 207344k
Peak memory use before GGC: 108724k
Peak memory use after GGC: 87091k
Maximum of released memory in single GGC run: 35979k
Garbage: 505009k
Leak: 11217k
Overhead: 83704k
GGC runs: 385
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 207344k
Peak memory use before GGC: 108729k
Peak memory use after GGC: 87096k
Maximum of released memory in single GGC run: 35979k
Garbage: 506097k
Leak: 11263k
Overhead: 84096k
GGC runs: 394
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 115380k -> 115352k
Peak memory use before GGC: 92257k -> 92230k
Peak memory use after GGC: 90051k -> 90024k
Maximum of released memory in single GGC run: 20148k -> 20138k
Garbage: 269110k -> 269032k
Leak: 60280k -> 60278k
Overhead: 47207k -> 47201k
GGC runs: 383
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory allocated via mmap and sbrk increased from 108492k to 109420k, overall 0.86%
Overall memory needed: 108492k -> 109420k
Peak memory use before GGC: 95715k -> 95749k
Peak memory use after GGC: 88917k -> 88881k
Maximum of released memory in single GGC run: 19546k -> 19568k
Garbage: 588862k -> 588973k
Leak: 62422k -> 62423k
Overhead: 131189k -> 130834k
GGC runs: 604 -> 607
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 109556k to 110388k, overall 0.76%
Overall memory needed: 109556k -> 110388k
Peak memory use before GGC: 95715k -> 95750k
Peak memory use after GGC: 88918k -> 88882k
Maximum of released memory in single GGC run: 19545k -> 19569k
Garbage: 642640k -> 642082k
Leak: 62985k -> 62984k
Overhead: 154660k -> 154142k
GGC runs: 642 -> 635
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory allocated via mmap and sbrk increased from 107468k to 108032k, overall 0.52%
Overall memory needed: 107468k -> 108032k
Peak memory use before GGC: 91702k -> 91495k
Peak memory use after GGC: 90400k -> 90193k
Maximum of released memory in single GGC run: 20260k -> 20251k
Garbage: 674194k -> 672995k
Leak: 63375k -> 63388k
Overhead: 163491k -> 163212k
GGC runs: 629 -> 628
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2004-09-22 12:42:25.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2004-09-22 20:19:28.000000000 +0000
@@ -1,3 +1,50 @@
+2004-09-22 Kazu Hirata <kazu@cs.umass.edu>
+
+ * doc/c-tree.texi (TRUTH_NOT_EXPR, TRUTH_ANDIF_EXPR,
+ TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR,
+ TRUTH_XOR_EXPR): Mention the restriction on types.
+
+2004-09-22 Matt Austern <austern@apple.com>
+
+ * config/darwin.c (darwin_make_decl_one_only)
+ Allow coalesced symbol to appear in static archive's table of contents
+
+2004-09-22 Kazu Hirata <kazu@cs.umass.edu>
+
+ PR tree-optimization/17512
+ * convert.c (convert_to_integer): Don't handle TRUTH_*_EXPR as
+ special cases.
+
+2004-09-22 David Edelsohn <edelsohn@gnu.org>
+
+ * dbxout.c (get_lang_number): Do not define if
+ DBX_OUTPUT_MAIN_SOURCE_DIRECTORY is defined.
+
+2004-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ PR target/15583
+ * config/rs6000/rtems.h (TARGET_OS_CPP_BUILTINS): Add
+ builtin_define ("__USE_INIT_FINI__").
+
+2004-09-22 P.J. Darcy <darcypj@us.ibm.com>
+
+ * config/s390/s390-protos.h (s390_emit_tpf_eh_return): Add prototype.
+ * config/s390/s390.c (s390_emit_tpf_eh_return): New function.
+ * config/s390/s390.h (TARGET_TPF): New macro.
+ * config/s390/s390.md ("eh_return"): New expander.
+ * config/s390/t-tpf (LIB2ADDEH): Use unwind-dw2-fde.c rather than
+ unwind-dw2-fde-glibc.c. Add config/s390/tpf-eh.c.
+ (LIB2ADDEHDEP): Remove unwind-dw2-fde.c.
+ * config/s390/tpf.h (TARGET_TPF): Define to 1.
+ (STACK_POINTER_OFFSET): Increase to 448.
+ (TARGET_DEFAULT): Set -mtpf-trace on as default.
+ (TPF_LOC_DIFF_OFFSET): New macro.
+ (ASM_PREFERRED_EH_DATA_FORMAT): Redefine to always use absolute
+ encoding.
+ (__isPATrange): Add prototype.
+ (MD_FALLBACK_FRAME_STATE_FOR): Define.
+ * config/s390/tpf-eh.c: New file.
+
2004-09-22 Diego Novillo <dnovillo@redhat.com>
* fold-const.c (fold): Avoid non INTEGER_TYPEs when widening
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2004-09-22 11:12:03.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2004-09-22 20:19:28.000000000 +0000
@@ -1,5 +1,11 @@
2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
+ * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
+ * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
+ * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
+ (init_rtti_processing): Initialize it to something realistic.
+ (get_tinfo_decl): Adjust pushing the new decl.
+
* cp-tree.h (struct lang_type_class): Remove marked flags, add
diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
(TYPE_MARKED_P): New.
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.