Some aspect of GCC memory consumption increased by recent patch
gcctest@suse.de
gcctest@suse.de
Thu Sep 9 05:06:00 GMT 2004
Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:
comparing combine.c compilation at -O0 level:
Amount of produced GGC garbage decreased from 46365k to 42489k, overall -9.12%
Peak memory use before GGC: 9500k
Peak memory use after GGC: 8824k -> 8812k
Maximum of released memory in single GGC run: 2882k -> 2867k
Garbage: 46365k -> 42489k
Leak: 7387k -> 7372k
Overhead: 5821k -> 5816k
GGC runs: 462 -> 360
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage decreased from 83793k to 79893k, overall -4.88%
Peak memory use before GGC: 9702k
Peak memory use after GGC: 8824k -> 8823k
Maximum of released memory in single GGC run: 2069k -> 2069k
Garbage: 83793k -> 79893k
Leak: 7181k -> 7181k
Overhead: 14005k -> 14001k
GGC runs: 691 -> 588
comparing combine.c compilation at -O2 level:
Peak amount of GGC memory allocated before garbage collecting increased from 13294k to 13312k, overall 0.14%
Amount of produced GGC garbage decreased from 99778k to 95880k, overall -4.07%
Peak memory use before GGC: 13294k -> 13312k
Peak memory use after GGC: 13160k -> 13165k
Maximum of released memory in single GGC run: 2576k -> 2577k
Garbage: 99778k -> 95880k
Leak: 6999k -> 6999k
Overhead: 18834k -> 18830k
GGC runs: 678 -> 575
comparing combine.c compilation at -O3 level:
Peak memory use before GGC: 13850k
Peak memory use after GGC: 13161k -> 13165k
Maximum of released memory in single GGC run: 3484k -> 3484k
Garbage: 131532k -> 127651k
Leak: 7581k -> 7565k
Overhead: 24746k -> 24742k
GGC runs: 743 -> 642
comparing Gerald's testcase PR8361 compilation at -O0 level:
Peak memory use before GGC: 93183k
Peak memory use after GGC: 91694k -> 91694k
Maximum of released memory in single GGC run: 20289k -> 20289k
Garbage: 267691k -> 267691k
Leak: 61513k -> 61513k
Overhead: 35037k -> 35037k
GGC runs: 548 -> 548
comparing Gerald's testcase PR8361 compilation at -O1 level:
Peak memory use before GGC: 97174k
Peak memory use after GGC: 90561k -> 90561k
Maximum of released memory in single GGC run: 19488k -> 19488k
Garbage: 545333k -> 545333k
Leak: 63318k -> 63318k
Overhead: 75450k -> 75450k
GGC runs: 763 -> 763
comparing Gerald's testcase PR8361 compilation at -O2 level:
Peak memory use before GGC: 97175k
Peak memory use after GGC: 90562k -> 90562k
Maximum of released memory in single GGC run: 19489k -> 19489k
Garbage: 600982k -> 600982k
Leak: 63940k -> 63940k
Overhead: 93911k -> 93911k
GGC runs: 821 -> 821
comparing Gerald's testcase PR8361 compilation at -O3 level:
Peak memory use before GGC: 92864k
Peak memory use after GGC: 91396k -> 91396k
Maximum of released memory in single GGC run: 20194k -> 20194k
Garbage: 616950k -> 616950k
Leak: 64601k -> 64601k
Overhead: 95864k -> 95864k
GGC runs: 803 -> 803
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2004-09-08 19:37:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2004-09-09 04:37:43.000000000 +0000
@@ -1,3 +1,142 @@
+2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ PR c/8420
+ * c-tree.h (struct c_declspecs): New.
+ (struct c_declarator, struct c_type_name, struct c_parm): Update
+ element types.
+ (build_array_declarator, grokfield, shadow_tag, shadow_tag_warned,
+ start_function, start_decl, build_c_parm,
+ make_pointer_declarator): Update prototypes.
+ (build_null_declspecs, declspecs_add_qual, declspecs_add_type,
+ declspecs_add_scspec, declspecs_add_attrs): New.
+ (split_specs_attrs): Remove.
+ * c-parse.in (%union): Add dsptype.
+ (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea,
+ declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea,
+ declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea,
+ declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea,
+ declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea,
+ declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea,
+ declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea,
+ declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea, declspecs_ts,
+ declspecs_nots, declspecs_ts_nosa, declspecs_nots_nosa,
+ declspecs_nosc_ts, declspecs_nosc_nots, declspecs_nosc, declspecs,
+ maybe_type_quals_attrs): Change to dsptype.
+ (struct c_declspec_stack): New.
+ (current_declspecs, declspec_stack): Change type.
+ (PUSH_DECLSPEC_STACK, POP_DECLSPEC_STACK): Update to new
+ structures.
+ (extdefs): Likewise.
+ (setspecs): Likewise.
+ (fndef): Use current_declspecs for empty declspecs list.
+ (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea,
+ declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea,
+ declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea,
+ declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea,
+ declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea,
+ declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea,
+ declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea,
+ declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea): Update to new
+ structures and helper functions. Update comments.
+ (typespec_nonattr): Correct comment.
+ (maybe_type_quals_attrs, typename): Update to new structures.
+ * c-decl.c (grokdeclarator, build_array_declarator, grokfield,
+ shadow_tag, shadow_tag_warned, start_function, start_decl,
+ build_c_parm, make_pointer_declarator,
+ set_array_declarator_inner, groktypename): Update to new
+ structures.
+ (build_null_declspecs, declspecs_add_qual, declspecs_add_type,
+ declspecs_add_scspec, declspecs_add_attrs): New.
+ (split_specs_attrs): Remove.
+ (shadow_tag_warned): Make warning for useless type names a
+ pedwarn. Give hard error for long, short, signed, unsigned or
+ _Complex used with struct, union or enum in empty declaration.
+ Make found_tag a bool.
+ (grokdeclarator): Remove checks now done at parse time.
+
+2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-tree.h (enum c_declarator_kind, struct c_arg_info, struct
+ c_declarator, struct c_type_name, struct c_parm): New.
+ (build_array_declarator, set_array_declarator_inner,
+ get_parm_info, grokfield, groktypename, grokparm, push_parm_decl,
+ start_function, start_decl, build_c_parm, build_attrs_declarator,
+ build_function_declarator, make_pointer_declarator, c_cast_expr,
+ store_parm_decls_newstyle, c_expr_sizeof_type): Update prototypes.
+ (build_id_declarator): New.
+ * c-typeck.c (c_cast_expr, c_expr_sizeof_type): Update to new
+ structures.
+ * c-decl.c (ARG_INFO_PARMS, ARG_INFO_TAGS, ARG_INFO_TYPES,
+ ARG_INFO_OTHERS): Remove.
+ (build_id_declarator): New.
+ (build_array_declarator, set_array_declarator_inner, groktypename,
+ start_decl, grokparm, push_parm_decl, grokparms, get_parm_info,
+ grokfield, start_function, store_parm_decls_newstyle,
+ store_parm_decls_oldstyle, store_parm_decls,
+ build_c_parm, build_attrs_declarator, build_function_declarator,
+ make_pointer_declarator, grokdeclarator): Update to new
+ structures.
+ * c-parse.in (%union): Add arginfotype, dtrtype, typenametype and
+ parmtype.
+ (declarator, notype_declarator, after_type_declarator,
+ parm_declarator, parm_declarator_starttypename,
+ parm_declarator_nostarttypename, array_declarator, typename,
+ absdcl, absdcl1, absdcl1_ea, absdcl1_noea, direct_absdcl1,
+ absdcl_maybe_attribute, parm, firstparm, parms, parmlist,
+ parmlist_1, parmlist_2, parmlist_or_identifiers,
+ parmlist_or_identifiers_1): Use these types.
+ (primary, after_type_declarator, parm_declarator_starttypename,
+ notype_declarator, component_decl, component_declarator,
+ component_notype_declarator, typename, absdcl,
+ absdcl_maybe_attribute, absdcl1_ea, direct_absdcl1, parmlist_1,
+ parmlist_2, parmlist_or_identifiers_1): Update to new structures.
+
+2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-tree.h (C_DECL_USED, parser_obstack, in_alignof, in_sizeof,
+ in_typeof, record_maybe_used_decl, pop_maybe_used,
+ c_expr_sizeof_expr, c_expr_sizeof_type): New.
+ * c-decl.c (parser_obstack): New.
+ (c_init_decl_processing): Initialize parser_obstack.
+ (c_write_global_declarations_1): Check for used but undefined
+ static functions.
+ * c-parse.in (%union): Add otype.
+ (save_obstack_position): New.
+ (extdefs): Use it.
+ (unary_expr): Update in_sizeof and in_alignof. Use
+ c_expr_sizeof_expr and c_expr_sizeof_type.
+ (sizeof): Update in_sizeof.
+ (alignof): Update in_alignof.
+ (typeof): Update in_typeof.
+ (typespec_nonreserved_nonattr): Call pop_maybe_used.
+ * c-typeck.c (in_alignof, in_sizeof, in_typeof, struct
+ maybe_used_decl, maybe_used_decls, record_maybe_used_decl,
+ pop_maybe_used, c_expr_sizeof_expr, c_expr_sizeof_type): New.
+ (build_external_ref): Set C_DECL_USED or call
+ record_maybe_used_decl if appropriate.
+ * toplev.c (check_global_declarations): Check TREE_NO_WARNING.
+
+2004-09-08 Eric Christopher <echristo@redhat.com>
+
+ * builtins.c: Fix prototype for fold_builtin_atan.
+
+2004-09-08 Eric Christopher <echristo@redhat.com>
+
+ * builtins.c (fold_builtin_strlen, fold_builtin_sqrt, fold_builtin_cbrt,
+ fold_builtin_pow, fold_builtin_sin, fold_builtin_cos, fold_builtin_tan,
+ fold_builtin_atan): New functions. Migrate function bodies...
+ (fold_builtin_1): ... from here.
+
+2004-09-09 Alan Modra <amodra@bigpond.net.au>
+
+ * config/rs6000/rs6000.c (rs6000_stack_info): Correct alignment of
+ save_size.
+
+2004-09-08 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/power4.md (power4-lmul): du4 feeds iu1.
+ * config/rs6000/power5.md (power5-lmul): Same.
+
2004-09-08 Richard Henderson <rth@redhat.com>
PR rtl-opt/17186
@@ -90,7 +229,7 @@
edge block.
(replace_phi_with_cond_modify_expr): Select conditional expr args
based on true edge basic block.
-
+
2004-09-08 Jan Hubicka <jh@suse.cz>
* tree-ssa-operands.c (add_stmt_operand): Use V_MUST_DEF even for
@@ -139,7 +278,7 @@
(gcc_loop_to_lambda_loop): Handle all exit tests.
Handle case where we have (invariant >= induction var).
(find_induction_var_from_exit_cond): Ditto.
-
+
2004-09-08 Jie Zhang <zhangjie@magima.com.cn>
* tree-ssa-alias.c (compute_flow_insensitive_aliasing): If type
@@ -279,7 +418,7 @@
force operand 0.0 into register in XFmode. Also do not force
operand 0.0 into register if !TARGET_CMOVE.
* config/i386/i386.md (*cmpfp_0): Delete. Remove comment.
- (*cmpfp_0_sf, cmpfp_0_df, cmpfp_0_xf): New patterns to
+ (*cmpfp_0_sf, cmpfp_0_df, cmpfp_0_xf): New patterns to
implement ftst x87 instruction.
(*fp_jcc_7): New insn pattern. Change corresponding split
pattern to handle "general_operand" instead of
@@ -410,7 +549,7 @@
* cfgrtl.c (rtl_verify_flow_info_1): Add new edge flag,
EDGE_CROSSING, to flags test case.
-
+
2004-09-07 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Deal with '<'
@@ -510,7 +649,7 @@
check_format_types, format_type_warning,
find_char_info_specifier_index, init_dynamic_asm_fprintf_info,
init_dynamic_diag_info, handle_format_attribute): Likewise.
- * c-gimplify.c (push_context, pop_context, finish_bc_block):
+ * c-gimplify.c (push_context, pop_context, finish_bc_block):
* c-lex.c (c_lex_with_flags, lex_string): Likewise.
* c-objc-common.c (c_tree_printer): Likewise.
* c-pch.c (pch_init): Likewise.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2004-09-08 11:38:44.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2004-09-09 04:37:47.000000000 +0000
@@ -1,3 +1,14 @@
+2004-09-08 Ziemowit Laski <zlaski@apple.com>
+
+ * Make-lang.in (cp/semantics.o): Depend on c-common.h.
+ * semantics.c: Include c-common.h.
+ (finish_compound_stmt): Call objc_clear_super_receiver().
+
+2004-09-08 Ziemowit Laski <zlaski@apple.com>
+
+ * cp-tree.h (do_poplevel): New prototype.
+ * semantics.c (do_poplevel): Make externally visible.
+
2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (tree_pair_s): Define a GC'd vector.
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.
More information about the Gcc-regression
mailing list