GCC memory consumption increased by recent patch!
gcctest@suse.de
gcctest@suse.de
Wed Sep 8 20:07: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:
Peak amount of GGC memory still allocated after garbage collectin increased from 8812k to 8824k, overall 0.14%
Amount of memory still referenced at the end of compilation increased from 7371k to 7387k, overall 0.22%
Peak memory use before GGC: 9500k
Peak memory use after GGC: 8812k -> 8824k
Maximum of released memory in single GGC run: 2881k -> 2882k
Garbage: 46350k -> 46365k
Leak: 7371k -> 7387k
Overhead: 5811k -> 5821k
GGC runs: 463 -> 462
comparing combine.c compilation at -O1 level:
Peak memory use before GGC: 9702k
Peak memory use after GGC: 8824k -> 8824k
Maximum of released memory in single GGC run: 2070k -> 2069k
Garbage: 83753k -> 83793k
Leak: 7181k -> 7181k
Overhead: 14003k -> 14005k
GGC runs: 691 -> 691
comparing combine.c compilation at -O2 level:
Peak memory use before GGC: 13294k
Peak memory use after GGC: 13160k -> 13160k
Maximum of released memory in single GGC run: 2576k -> 2576k
Garbage: 99727k -> 99778k
Leak: 6999k -> 6999k
Overhead: 18818k -> 18834k
GGC runs: 678 -> 678
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7549k to 7581k, overall 0.42%
Peak memory use before GGC: 13850k
Peak memory use after GGC: 13161k -> 13161k
Maximum of released memory in single GGC run: 3484k -> 3484k
Garbage: 131515k -> 131532k
Leak: 7549k -> 7581k
Overhead: 24734k -> 24746k
GGC runs: 743 -> 743
comparing Gerald's testcase PR8361 compilation at -O0 level:
Amount of produced GGC garbage increased from 266369k to 267691k, overall 0.50%
Peak memory use before GGC: 93183k
Peak memory use after GGC: 91694k -> 91694k
Maximum of released memory in single GGC run: 20289k -> 20289k
Garbage: 266369k -> 267691k
Leak: 61513k -> 61513k
Overhead: 34609k -> 35037k
GGC runs: 547 -> 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: 545183k -> 545333k
Leak: 63318k -> 63318k
Overhead: 75401k -> 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: 600944k -> 600982k
Leak: 63940k -> 63940k
Overhead: 93876k -> 93911k
GGC runs: 822 -> 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: 617007k -> 616950k
Leak: 64593k -> 64601k
Overhead: 95859k -> 95864k
GGC runs: 803 -> 803
Head of changelog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2004-09-08 15:37:16.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2004-09-08 19:37:13.000000000 +0000
@@ -1,3 +1,129 @@
+2004-09-08 Richard Henderson <rth@redhat.com>
+
+ PR rtl-opt/17186
+ * function.c (expand_function_end): Have fall-off-the-end
+ return path jump around return register setup.
+
+2004-09-08 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * config/sparc/sparc.c (sparc_indent_opcode): New variable.
+ (output_return): Do not test for the presence of the 'unimp' insn.
+ Use 'current_function_uses_only_leaf_regs' and 'final_sequence'
+ as predicates instead of custom ones. Return raw strings when
+ possible.
+ (output_sibcall): Likewise. Concatenate strings.
+ (output_ubranch): Remove kludge for TurboSPARC.
+ (output_cbranch): Remove 'noop' parameter. Do not output 'nop'.
+ (output_v9branch): Likewise.
+ (print_operand): Use 'final_sequence' instead of 'dbr_sequence_length'.
+ <#>: Set sparc_indent_opcode if the delay slot is filled.
+ <(>: Likewise.
+ <)>: New operand to emit the displacement from the saved PC on return.
+ <@>: Remove.
+ * config/sparc/sparc.h (sparc_indent_opcode): Declare it.
+ (ASM_OUTPUT_OPCODE): New macro.
+ (PRINT_OPERAND_PUNCT_VALID_P): Remove '^' and add ')'.
+ * config/sparc/sparc.md (normal_branch, inverted_branch,
+ normal_fp_branch, inverted_fp_branch, normal_fpe_branch,
+ inverted_fpe_branch): Adjust call to output_cbranch.
+ (normal_int_branch_sp64, inverted_int_branch_sp64): Adjust
+ call to output_v9branch.
+ * config/sparc/sparc-protos.h (output_cbranch): Adjust.
+ (output_v9branch): Likewise.
+
+2004-09-08 Devang Patel <dpatel@apple.com>
+
+ * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add -segaddr,
+ -segs_read_only_addr and -segs_read_write_addr.
+ (WORD_SWITCH_TAKES_ARG): Same.
+ (LINK_SPEC): Same.
+ * doc/invoke.texi: Document -segaddr, -segs_read_only_addr and
+ -segs_read_write_addr.
+
+2004-09-08 Richard Henderson <rth@redhat.com>
+
+ * function.c (reference_callee_copied): New.
+ (assign_parm_setup_reg): Use it.
+ * calls.c (initialize_argument_information): Likewise.
+ (emit_library_call_value_1): Likewise.
+ * function.h (reference_callee_copied): Declare.
+
+ * target.h (struct gcc_target): Add callee_copies.
+ * target-def.h (TARGET_CALLEE_COPIES): New.
+ (TARGET_PASS_BY_REFERENCE): Update default.
+ * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * targhooks.c (hook_callee_copies_named): New.
+ (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from
+ hook_pass_by_reference_false.
+ (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New.
+ * targhooks.h: Update decls.
+ * config/arc/arc.c (TARGET_CALLEE_COPIES): New.
+ * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove.
+ * config/frv/frv.c (frv_function_arg_callee_copies): Remove.
+ * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New.
+ * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New.
+ * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/mips/mips.c (TARGET_CALLEE_COPIES): New.
+ (mips_callee_copies): New.
+ * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New.
+ * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New.
+ * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/pa/pa.c (TARGET_CALLEE_COPIES): New.
+ * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/sh/sh.c (sh_callee_copies): New.
+ (TARGET_CALLEE_COPIES): New.
+ * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * config/v850/v850.c (TARGET_CALLEE_COPIES): New.
+ * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
+ * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation
+ for FUNCTION_ARG_CALLEE_COPIES.
+ * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update.
+
+2004-09-08 Devang Patel <dpatel@apple.com>
+
+ * tree-if-conv.c (find_phi_replacement_condition): Return true
+ 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
+ variables being alias set.
+
+2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * final.c (shorten_branches, final, get_insn_template,
+ output_alternate_entry_point, final_scan_insn, alter_subreg,
+ alter_cond, output_operand, asm_fprintf, final_forward_branch_p,
+ leaf_renumber_regs_insn): Use gcc_assert and gcc_unreachable.
+ * fix-header.c (lookup_std_proto): Likewise.
+ * flow.c (first_insn_after_basic_block_note, verify_wide_reg,
+ verify_local_live_at_start, update_life_info, mark_reg,
+ calculate_global_regs_live, allocate_reg_life_data,
+ init_propagate_block_info, mark_set_regs, flush_reg_cond_reg_1,
+ ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond,
+ attempt_auto_inc, mark_used_reg, mark_used_regs): Likewise.
+ * fold-const.c (force_fit_type, div_and_round_double,
+ may_negate_without_overflow_p, int_const_binop, const_binop,
+ size_binop, size_diffop, fold_convert_const, fold_convert,
+ invert_tree_comparison, swap_tree_comparison,
+ comparison_to_compcode, compcode_to_comparison, invert_truthvalue,
+ range_binop, make_range, fold_cond_expr_with_comparison,
+ fold_div_compare, fold, fold_checksum_tree, fold_negate_const,
+ fold_abs_const, fold_not_const, fold_relational_const, round_up,
+ round_down): Likewise.
+ * function.c (find_function_data, assign_stack_temp_for_type,
+ instantiate_virtual_regs_lossage, aggregate_value_p,
+ assign_parm_find_entry_rtl, assign_parm_setup_block,
+ expand_function_start, expand_function_end, keep_stack_depressed,
+ handle_epilogue_set, thread_prologue_and_epilogue_insns): Likewise.
+
2004-09-08 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (tree-loop-linear.o): Added.
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