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]

A recent patch increased GCC's memory consumption!


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: 25001k -> 25009k
    Peak memory use before GGC: 9600k
    Peak memory use after GGC: 8947k
    Maximum of released memory in single GGC run: 2737k
    Garbage: 40106k
    Leak: 6665k
    Overhead: 5745k
    GGC runs: 317

comparing combine.c compilation at -O1 level:
  Amount of produced GGC garbage increased from 60857k to 61153k, overall 0.49%
    Overall memory needed: 26824k
    Peak memory use before GGC: 17368k
    Peak memory use after GGC: 17185k
    Maximum of released memory in single GGC run: 2373k -> 2376k
    Garbage: 60857k -> 61153k
    Leak: 6811k -> 6811k
    Overhead: 7547k -> 7575k
    GGC runs: 387 -> 389

comparing combine.c compilation at -O2 level:
  Amount of produced GGC garbage increased from 77543k to 77870k, overall 0.42%
    Overall memory needed: 26824k
    Peak memory use before GGC: 17370k
    Peak memory use after GGC: 17185k
    Maximum of released memory in single GGC run: 2453k -> 2455k
    Garbage: 77543k -> 77870k
    Leak: 6902k -> 6902k
    Overhead: 9990k -> 10019k
    GGC runs: 458 -> 449

comparing combine.c compilation at -O3 level:
  Amount of produced GGC garbage increased from 108281k to 108739k, overall 0.42%
  Amount of memory still referenced at the end of compilation increased from 6972k to 6986k, overall 0.20%
    Overall memory needed: 26824k
    Peak memory use before GGC: 18362k -> 18279k
    Peak memory use after GGC: 17991k -> 17968k
    Maximum of released memory in single GGC run: 3520k -> 3521k
    Garbage: 108281k -> 108739k
    Leak: 6972k -> 6986k
    Overhead: 13569k -> 13598k
    GGC runs: 509 -> 504

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 80924k -> 80920k
    Peak memory use before GGC: 69474k
    Peak memory use after GGC: 45012k
    Maximum of released memory in single GGC run: 36247k
    Garbage: 146441k
    Leak: 10057k
    Overhead: 19752k
    GGC runs: 251

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 112076k -> 112040k
    Peak memory use before GGC: 94446k
    Peak memory use after GGC: 83545k
    Maximum of released memory in single GGC run: 32589k
    Garbage: 296158k -> 296205k
    Leak: 10012k
    Overhead: 36702k -> 36708k
    GGC runs: 247

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 125640k -> 125604k
    Peak memory use before GGC: 111800k
    Peak memory use after GGC: 83500k
    Maximum of released memory in single GGC run: 32172k
    Garbage: 381049k -> 381111k
    Leak: 10118k
    Overhead: 48222k -> 48234k
    GGC runs: 275 -> 273

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 125688k -> 125668k
    Peak memory use before GGC: 111832k -> 111830k
    Peak memory use after GGC: 83533k -> 83531k
    Maximum of released memory in single GGC run: 32496k -> 32495k
    Garbage: 381633k -> 381695k
    Leak: 10123k
    Overhead: 48375k -> 48386k
    GGC runs: 277 -> 275

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118388k
    Peak memory use before GGC: 95145k
    Peak memory use after GGC: 94197k
    Maximum of released memory in single GGC run: 20460k
    Garbage: 223586k
    Leak: 49217k
    Overhead: 36706k
    GGC runs: 370

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 105512k
    Peak memory use before GGC: 95273k
    Peak memory use after GGC: 93199k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 567620k -> 568012k
    Leak: 54823k -> 54823k
    Overhead: 68002k -> 68057k
    GGC runs: 521 -> 522

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 106432k -> 105696k
    Peak memory use before GGC: 95274k
    Peak memory use after GGC: 93199k
    Maximum of released memory in single GGC run: 20343k
    Garbage: 650526k -> 650780k
    Leak: 55647k -> 55646k
    Overhead: 79126k -> 79145k
    GGC runs: 586 -> 588

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 109368k -> 109416k
    Peak memory use before GGC: 96742k
    Peak memory use after GGC: 94277k
    Maximum of released memory in single GGC run: 20839k
    Garbage: 709605k -> 709991k
    Leak: 56958k -> 56956k
    Overhead: 84135k -> 84155k
    GGC runs: 594 -> 595

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-12-12 15:04:35.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-12-13 01:25:57.000000000 +0000
@@ -1,3 +1,44 @@
+2005-12-11 Rafael ?vila de Esp?ndola <rafael.espindola@gmail.com>
+
+        * tree-flow.h: Allow compilation with a C++ compiler.
+        (struct edge_prediction): Prefix all field names  with "ep_".
+        * predict.c (tree_predicted_by_p): Likewise for struct edge_prediction.
+        (tree_predict_edge, combine_predictions_for_bb): Likewise.
+        (remove_predictions_associated_with_edge): Likewise.
+	
+2005-12-12  Jeff Law  <law@redhat.com>
+
+	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove
+	reassociation code.
+	* passes.c (init_optimization_passes): Run reassociation again
+	after loop optimizations.
+
+2005-12-12  Daniel Berlin  <dberlin@dberlin.org>
+
+	* tree-ssa-dom.c (thread_across_edge): Canonicalize condition
+	if necessary.
+	(optimize_stmt): Ditto.
+	(canonicalize_comparison): New function.
+	* tree-ssa-operands.c (swap_tree_operands): Make external.
+	(get_expr_operands): Stop auto-canonicalization.
+	* tree-ssa-reassoc.c: Rewrite.
+	(init_optimization_passes): 
+	* tree-flow.h (swap_tree_operands): Prototype.
+	* Makefile.in (tree-ssa-reassoc.o): Update dependencies.
+
+2005-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* pa.c (pa_output_function_epilogue): Set cfun->machine->in_nsubspa to
+	indicate function epilogue has been output.
+	(pa_asm_output_mi_thunk): Likewise.
+	(output_deferred_plabels): Put plabels in readonly data section when
+	not generating PIC code.
+	(som_output_text_section_asm_op): Use .NSUBSPA to output debug
+	information.  Add assert.
+	(som_output_comdat_data_section_asm_op): New function.
+	(pa_som_asm_init_sections): Use som_output_comdat_data_section_asm_op
+	instead of output_section_asm_op for COMDAT sections.
+
 2005-12-12  J"orn Rennecke <joern.rennecke@st.com>
 
 	* cfgcleanup.c (condjump_equiv_p, try_crossjump_to_edge):
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2005-12-12 04:42:32.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2005-12-13 01:25:56.000000000 +0000
@@ -1,3 +1,9 @@
+2005-12-12  Mark Mitchell  <mark@codesourcery.com>
+
+	PR c++/25300
+	* tree.c (build_qualified_name): Return error_mark_node for
+	erroneous input.
+
 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
 
 	PR c++/25337 


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.


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