This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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:
  Amount of memory still referenced at the end of compilation increased from 6471k to 6487k, overall 0.25%
    Overall memory needed: 24992k -> 24996k
    Peak memory use before GGC: 9438k -> 9439k
    Peak memory use after GGC: 8751k -> 8752k
    Maximum of released memory in single GGC run: 2797k
    Garbage: 42325k -> 42285k
    Leak: 6471k -> 6487k
    Overhead: 5875k -> 5875k
    GGC runs: 327 -> 326

comparing combine.c compilation at -O1 level:
    Overall memory needed: 27172k -> 27180k
    Peak memory use before GGC: 8786k -> 8787k
    Peak memory use after GGC: 8552k -> 8553k
    Maximum of released memory in single GGC run: 2170k
    Garbage: 60418k -> 60398k
    Leak: 6838k
    Overhead: 7580k -> 7578k
    GGC runs: 500

comparing combine.c compilation at -O2 level:
    Overall memory needed: 19948k -> 19952k
    Peak memory use before GGC: 12763k -> 12764k
    Peak memory use after GGC: 12633k -> 12634k
    Maximum of released memory in single GGC run: 2618k
    Garbage: 85718k -> 85707k
    Leak: 6656k
    Overhead: 10965k -> 10963k
    GGC runs: 524

comparing combine.c compilation at -O3 level:
    Overall memory needed: 23120k -> 23088k
    Peak memory use before GGC: 14713k
    Peak memory use after GGC: 12944k
    Maximum of released memory in single GGC run: 3069k
    Garbage: 119012k -> 118975k
    Leak: 7119k
    Overhead: 15158k -> 15154k
    GGC runs: 591

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 85868k -> 85876k
    Peak memory use before GGC: 74239k -> 74240k
    Peak memory use after GGC: 45259k -> 45261k
    Maximum of released memory in single GGC run: 38092k
    Garbage: 154674k -> 154669k
    Leak: 11186k
    Overhead: 19889k -> 19889k
    GGC runs: 268

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 99296k -> 99368k
    Peak memory use before GGC: 72837k -> 72838k
    Peak memory use after GGC: 64735k -> 64736k
    Maximum of released memory in single GGC run: 37093k -> 37092k
    Garbage: 308906k -> 308909k
    Leak: 11478k
    Overhead: 38025k -> 38026k
    GGC runs: 374 -> 375

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 142428k -> 142452k
    Peak memory use before GGC: 116905k
    Peak memory use after GGC: 88272k
    Maximum of released memory in single GGC run: 35225k
    Garbage: 425821k -> 425823k
    Leak: 11280k
    Overhead: 52918k -> 52918k
    GGC runs: 331 -> 332

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 141188k -> 142464k
    Peak memory use before GGC: 116907k
    Peak memory use after GGC: 88274k
    Maximum of released memory in single GGC run: 35225k
    Garbage: 426575k -> 426580k
    Leak: 11310k
    Overhead: 53040k -> 53041k
    GGC runs: 336 -> 337

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 112460k
    Peak memory use before GGC: 87827k
    Peak memory use after GGC: 86409k
    Maximum of released memory in single GGC run: 20839k
    Garbage: 248055k
    Leak: 53983k
    Overhead: 43233k
    GGC runs: 370

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 95036k
    Peak memory use before GGC: 86942k
    Peak memory use after GGC: 85413k
    Maximum of released memory in single GGC run: 20531k
    Garbage: 555117k
    Leak: 57726k
    Overhead: 72051k
    GGC runs: 592

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 95024k -> 95020k
    Peak memory use before GGC: 86942k
    Peak memory use after GGC: 85413k
    Maximum of released memory in single GGC run: 20530k
    Garbage: 646953k
    Leak: 58598k
    Overhead: 90056k
    GGC runs: 687

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 95944k
    Peak memory use before GGC: 87872k
    Peak memory use after GGC: 86704k
    Maximum of released memory in single GGC run: 20795k
    Garbage: 667007k
    Leak: 59651k
    Overhead: 92845k
    GGC runs: 687

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-05-10 05:32:56.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-05-10 18:18:53.000000000 +0000
@@ -1,3 +1,148 @@
+2005-05-10  Richard Henderson  <rth@redhat.com>
+
+	* config/ia64/ia64.c (ia64_expand_atomic_op): New.
+	* config/ia64/ia64-protos.h: Declare it.
+	* config/ia64/sync.md (I124MODE, FETCHOP, fetchop_name): New.
+	(sync_add<I48MODE>, sync_old_add<I48MODE>): Remove.
+	(sync_<FETCHOP><IMODE>, sync_nand<IMODE>): New.
+	(sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): New.
+	(sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): New.
+	(cmpxchg_rel_<I124MODE>): Split from cmpxchg_acq_<IMODE>.  Zero
+	extend result; use release semantics.
+	(cmpxchg_rel_di): Rename from cmpxchg_acq_<IMODE>; use release.
+	(sync_val_compare_and_swap_<IMODE>): Update to match.
+
+2005-05-10  Richard Henderson  <rth@redhat.com>
+
+	* optabs.c (expand_compare_and_swap_loop): Don't clobber old value
+	before comparing it for success.
+
+2005-05-10  Richard Henderson  <rth@redhat.com>
+
+	* config/ia64/sync.md (sync_add<I48MODE>): Fix arguments for
+	no return value pattern.
+
+2005-05-10  Grigory Zagorodnev  <grigory.zagorodnev@intel.com>
+            H.J. Lu  <hongjiu.lu@intel.com>
+
+	* libgcov.c (create_file_directory): New function. Create
+	directory for the given file name.
+	(gcov_max_filename): New static var. Keeps size of the longest
+	file name.
+	(gcov_exit): Always try to create directory for output
+	file. Relocate each filename basing on environment vars.
+	(__gcov_init): Remember the longest file name.
+	* tsystem.h: include filenames.h to get IS_DIR_SEPARATOR
+	* doc/gcov.texi (Cross-profiling): New node documenting
+	cross-profiling management.
+	* doc/invoke.texi (-fprofile-arcs): Add xref to cross-profiling.
+
+2005-05-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+	* config/sparc/sparc.c (mem_min_alignment): Do not rely
+	on MEM_ALIGN if TARGET_UNALIGNED_DOUBLES.
+
+2005-05-10  Bob Wilson  <bob.wilson@acm.org>
+
+	* config/xtensa/lib1funcs.asm (__udivsi3, __divsi3): Rearrange special
+	case code to avoid one move instruction.
+	(__umodsi3, __modsi3): Merge duplicated code sequences.
+
+2005-05-10  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* config/mips/24k.md, config/sh/divtab.c, config/sh/sh.c,
+	config/sh/sh.md, config/sh/superh.h: Fix comment typos.
+	* doc/invoke.texi: Fix typos.
+
+	* tree-data-ref.c (analyze_array_indexes, analyze_array,
+	init_data_ref, access_functions_are_affine_or_constant_p,
+	free_data_refs): Use VEC instead of VARRAY.
+	* tree-data-ref.h (data_reference): Change the type of
+	access_fns to VEC(tree,gc)*.
+	(DR_ACCESS_FN, DR_NUM_DIMENSIONS): Use VEC instead of VARRAY.
+
+2005-05-10  Gabor Loki <loki@gcc.gnu.org>
+
+	PR c/17913
+	* c-typeck.c (build_conditional_expr): Remove reducing cond_expr.
+	* fold-const.c (fold): Expand the condition of reducing cond_expr.
+	(contains_label_1, contains_label_p): New functions for checking
+	labels in a sub-tree.
+
+2005-05-10  Joseph S. Myers  <joseph@codesourcery.com>
+
+	PR c/21342
+	* c-decl.c (pushdecl): When there is a declaration in the current
+	scope and the declarations are external linkage, check for
+	compatibility with the type in the external scope and update the
+	type in the external scope with the composite type information.
+	Do not form a composite type of the new type and the visible type
+	if they are incompatible.
+
+2005-05-10  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* crtstuff.c: Revert part of 2005-05-08 Change.
+	(IN_LIBGCC2): Define.
+
+2005-05-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+	* config/sparc/sparc.c (fp_sethi_p): Test !SPARC_SIMM13_P and
+	remove redundant test.
+	(fp_mov_p): Accept 0.
+	(fp_high_losum_p): Remove redundant test.
+	* config/sparc/predicates.md (const_high_operand): Explicitly test
+	(not small_int_operand).
+	(fp_const_high_losum_operand): New.
+	* config/sparc/sparc.md (movsi_insn): Do not emit 'clr'.  Reorder.
+	(movdi_insn_sp32_v9): Use canonical predicates.
+	(movdi_insn_sp32): Test !TARGET_V9 instead of !TARGET_ARCH64.
+	(movdi_insn_sp64_novis): Delete.
+	(movdi_insn_sp64_vis): Rename into movdi_insn_sp64.
+	(movsf_insn_novis): Delete.
+	(movsf_insn_vis): Rename into movsf_insn.
+	(movsf_no_f_insn): Rename into movsf_insn_no_fpu.
+	(movsf_lo_sum): Use fp_const_high_losum_operand.
+	(movsf_high): Likewise.
+	(movsf_high_losum splitter): Likewise.
+	(mov<V32:mode> expander): Use register_or_zero_operand.
+	(mov<V64:mode> expander): Likewise.
+	(movdf_insn_sp32): Use register_or_zero_operand.
+	(movdf_no_e_insn_sp32): Use register_or_zero_operand.
+	Rename into movdf_insn_sp32_no_fpu.
+	(movdf_no_e_insn_v9_sp32): Use register_or_zero_operand.
+	Rename into movdf_insn_sp32_v9_no_fpu.
+	(movdf_insn_v9only_novis): Delete.
+	(movdf_insn_v9only_vis): Rename into movdf_insn_sp32_v9.
+	(movdf_insn_sp64_novis): Delete.
+	(movdf_insn_sp64_vis): Rename into movdf_insn_sp64.
+	(movdf_no_e_insn_sp64): Use register_or_zero_operand. 
+	Rename into movdf_insn_sp64_no_fpu.
+	(movtf expander): Use register_or_zero_operand.
+	(movtf_insn_sp32): Delete.
+	(movtf_insn_vis_sp32): Use register_or_zero_operand.
+	Rename into movtf_insn_sp32.
+	(movtf_no_e_insn_sp32): Use register_or_zero_operand.
+	Rename into movtf_insn_sp32_no_fpu.
+	(movtf_insn_hq_sp64): Delete.
+	(movtf_insn_hq_vis_sp64): Use register_or_zero_operand.
+	Rename into movtf_insn_sp64_hq.
+	(movtf_insn_sp64): Delete.
+	(movtf_insn_vis_sp64): Use register_or_zero_operand.
+	Rename into movtf_insn_sp64.
+	(movtf_no_e_insn_sp64): Use register_or_zero_operand.
+	Rename into movtf_insn_sp64_no_fpu.
+
+2005-05-10  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* config/stormy16/stormy16.c (xstormy16_emit_cbranch): Use
+	gcc_assert and gcc_unreachable as appropriate.
+	(xstormy16_split_cbranch, xstormy16_output_cbranch_hi,
+	xstormy16_output_cbranch_si, xstormy16_split_move,
+	xstormy16_initial_elimination_offset,
+	xstormy16_encode_section_info, xstormy16_print_operand_address,
+	xstormy16_expand_call, xstormy16_expand_arith,
+	xstormy16_output_shift, xstormy16_init_builtins): Likewise.
+
 2005-05-10  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* tree-outof-ssa.c (_elim_graph): Change the type of nodes and

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]