A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Oct 13 00:07:00 GMT 2005
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: 24881k
Peak memory use before GGC: 9593k
Peak memory use after GGC: 8940k
Maximum of released memory in single GGC run: 2736k
Garbage: 40083k
Leak: 6702k
Overhead: 5787k
GGC runs: 316
comparing combine.c compilation at -O1 level:
Overall memory needed: 26816k
Peak memory use before GGC: 17361k
Peak memory use after GGC: 17177k
Maximum of released memory in single GGC run: 2372k
Garbage: 60396k
Leak: 6891k
Overhead: 7572k
GGC runs: 386
comparing combine.c compilation at -O2 level:
Overall memory needed: 26816k
Peak memory use before GGC: 17363k
Peak memory use after GGC: 17177k
Maximum of released memory in single GGC run: 2453k
Garbage: 77630k
Leak: 6977k
Overhead: 10049k
GGC runs: 457
comparing combine.c compilation at -O3 level:
Overall memory needed: 26816k
Peak memory use before GGC: 18364k
Peak memory use after GGC: 17993k
Maximum of released memory in single GGC run: 3505k
Garbage: 110543k
Leak: 7076k
Overhead: 13849k
GGC runs: 520
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80920k
Peak memory use before GGC: 69468k
Peak memory use after GGC: 45006k
Maximum of released memory in single GGC run: 36248k
Garbage: 146344k
Leak: 10095k
Overhead: 19790k
GGC runs: 251
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 111684k
Peak memory use before GGC: 94036k
Peak memory use after GGC: 83552k
Maximum of released memory in single GGC run: 32589k
Garbage: 289752k
Leak: 10071k
Overhead: 36662k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 127120k
Peak memory use before GGC: 113346k
Peak memory use after GGC: 83465k
Maximum of released memory in single GGC run: 32177k
Garbage: 372158k
Leak: 10176k
Overhead: 48193k
GGC runs: 273
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 127180k
Peak memory use before GGC: 113372k
Peak memory use after GGC: 83491k
Maximum of released memory in single GGC run: 32501k
Garbage: 372757k
Leak: 10180k
Overhead: 48348k
GGC runs: 277
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of produced GGC garbage increased from 225933k to 226220k, overall 0.13%
Overall memory needed: 118152k -> 118164k
Peak memory use before GGC: 94917k -> 94931k
Peak memory use after GGC: 93978k -> 93990k
Maximum of released memory in single GGC run: 20288k
Garbage: 225933k -> 226220k
Leak: 49148k -> 49165k
Overhead: 36818k -> 36833k
GGC runs: 369 -> 372
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105660k -> 105912k
Peak memory use before GGC: 95213k -> 95226k
Peak memory use after GGC: 92611k -> 92624k
Maximum of released memory in single GGC run: 20357k
Garbage: 569429k -> 569745k
Leak: 54968k -> 54982k
Overhead: 67680k -> 67695k
GGC runs: 517 -> 520
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 106300k
Peak memory use before GGC: 95213k -> 95226k
Peak memory use after GGC: 92612k -> 92625k
Maximum of released memory in single GGC run: 20356k
Garbage: 652111k -> 652419k
Leak: 55761k -> 55775k
Overhead: 78927k -> 78942k
GGC runs: 585 -> 588
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 108888k -> 108864k
Peak memory use before GGC: 96505k -> 96517k
Peak memory use after GGC: 94553k -> 94566k
Maximum of released memory in single GGC run: 20677k -> 20676k
Garbage: 707439k -> 707718k
Leak: 56937k -> 56952k
Overhead: 83963k -> 83979k
GGC runs: 600 -> 603
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-10-12 12:42:39.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-10-12 22:57:50.000000000 +0000
@@ -1,3 +1,81 @@
+2005-10-12 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR target/24284
+ * config/sparc/sparc.c (gen_stack_pointer_inc): Build by hand.
+ (gen_stack_pointer_dec): Likewise.
+
+2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR middle-end/21275
+ PR middle-end/21766
+ * target.h (struct gcc_target): Add valid_dllimport_attribute_p
+ target hook.
+ (struct cxx): Add adjust_class_at_definition target hook.
+ * target-def.h: (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): New define,
+ defaulting to hook_bool_tree_true. Add to TARGET_INITIALIZER
+ (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): New define, defaulting to
+ hook_void_tree. Add to TARGET_CXX.
+ * tree.h (struct decl_with_vis): Rename non_addr_const_p field to
+ dllimport_flag.
+ (DECL_NON_ADDR_CONSTANT_P): Replace with DECL_DLLIMPORT_P macro.
+ * tree.c (merge_dllimport_decl_attributes): Check DECL_DLLIMPORT_P
+ instead of attribute. Check for dllexport override. Warn if
+ inconsistent dll linkage. Don't lose old dllimport if decl has
+ had address referenced. Tweak lookup of dllimport atribute.
+ (handle_dll_attribute): Check targetm.valid_dllimport_attribute_p
+ for target specific rules. Don't add dllimport attribute if
+ DECL_DECLARED_INLINE_P. Set DECL_DLLIMPORT_P when adding
+ dllimport attribute.
+ (staticp): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P.
+ * varasm.c (initializer_constant_valid_p): Replace
+ DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P
+
+ PR target/21801
+ PR target/23589
+ * config.gcc (i[34567]86-*-cygwin*): Add winnt-cxx.o to
+ 'cxx_target_objs', winnt-stubs,o to 'extra_objs'.
+ (i[34567]86-*-mingw32*): Likewise.
+
+ * doc/tm.texi (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Document.
+ (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Document.
+
+ * config/i386/winnt.c (i386_pe_dllimport_p): Factor out
+ C++-specific code. Change return value to bool.
+ (i386_pe_dllimport_p): Likewise.
+ (associated_type): Simplify and make language-independent
+ (i386_pe_encode_section_info): Replace override of ambiguous
+ dllimport symbol refs with a gcc_assert.
+ (i386_pe_valid_dllimport_attribute_p): Define.
+ * config/i386/winnt-cxx.c: New file. Define C++ versions of
+ i386_pe_type_dllimport_p, i386_pe_type_dllexport_p,
+ i386_pe_adjust_class_at_definition.
+ * config/i386/winnt-stubs.c: New file. Define stub versions of
+ lang-specific functions.
+ * config/i386/i386-protos.h: Declare winnt-[cxx|stubs].c functions
+ i386_pe_type_dllimport_p, i386_pe_type_dllexport_p,
+ i386_pe_adjust_class_at_definition.
+ (i386_pe_valid_dllimport_attribute_p): Declare.
+ * config/i386/cygming.h (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Define.
+ (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Define.
+ * config/i386/t-cygming: Add rules for winnt-cxx.o, winnt-stubs.o.
+
+ PR target/19704
+ * config/i386/i386.c (ix86_function_ok_for_sibcall): Replace test for
+ dllimport attribute with test of DECL_DLLIMPORT_P.
+
+2005-10-12 Adrian Straetling <straetling@de.ibm.com>
+
+ * combine.c (make_extraction): Correct offset computation.
+
+2005-10-12 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/t-linux (LIMITS_H_TEST): Define.
+
+2005-10-12 Richard Henderson <rth@redhat.com>
+
+ PR rtl-opt/23324
+ * cfgexpand.c (add_alias_set_conflicts): Use objects_must_conflict_p.
+
2005-10-12 Richard Guenther <rguenther@suse.de>
* Makefile.in (CGRAPH_H): Depend on $(TREE_H).
@@ -50,7 +128,6 @@
Only apply the optimization for rounding builtins if the inner
cast is also an extension.
->>>>>>> 2.10143
2005-10-11 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/23946
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-10-12 12:42:39.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-10-12 22:57:51.000000000 +0000
@@ -1,7 +1,51 @@
+2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR target/21801
+ PR target/23589
+ * class.c (finish_struct_1): Call
+ targetm.cxx.adjust_class_at_definition.
+
+
+2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/21592
+ * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
+ with already looked up member functions. Assert we're not
+ returning a NON_DEPENDENT_EXPR with unknown type.
+ * typeck.c (finish_class_member_access_expr): We can get
+ non-template-id-expr baselinks. If the lookup finds a baselink,
+ remember it even inside templates.
+
+ PR c++/23797
+ * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
+ TYPE_DECL. Use dependent_type_p to check type.
+ * pt.c (uses_template_parms_p): Use dependent_type_p for a
+ TYPE_DECL.
+ (type_dependent_expression_p): Assert we've not been given a
+ TYPE_DECL.
+
+ PR c++/21117
+ * decl.c (check_function_type): Correctly overwrite incomplete
+ return type with void type.
+ * typeck.c (check_return_expr): If the function's return type is
+ void, don't try and convert a return expr.
+
+2005-10-12 David Edelsohn <edelsohn@gnu.org>
+
+ PR c++/23730
+ * call.c (build_object_call): If BINFO is NULL, bypass
+ lookup_fnfields and set fns to NULL_TREE.
+
+2005-10-12 Paolo Bonzini <bonzini@gnu.org>
+
+ PR c++/24052
+ * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
+ an ADDR_EXPR of a LABEL_DECL as &&.
+
2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19964
- * cp/class.c (walk_subobject_offsets): Don't walk error_mark_node.
+ * class.c (walk_subobject_offsets): Don't walk error_mark_node.
2005-10-11 Ian Lance Taylor <ian@airs.com>
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