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 6380k to 6387k, overall 0.11%
    Overall memory needed: 24629k -> 24633k
    Peak memory use before GGC: 9346k -> 9351k
    Peak memory use after GGC: 8660k -> 8665k
    Maximum of released memory in single GGC run: 2864k
    Garbage: 41697k -> 41665k
    Leak: 6380k -> 6387k
    Overhead: 5774k -> 5772k
    GGC runs: 329 -> 328

comparing combine.c compilation at -O1 level:
  Amount of memory still referenced at the end of compilation increased from 6741k to 6749k, overall 0.11%
    Overall memory needed: 25449k -> 25461k
    Peak memory use before GGC: 9223k -> 9228k
    Peak memory use after GGC: 8728k -> 8733k
    Maximum of released memory in single GGC run: 2027k
    Garbage: 61252k -> 61218k
    Leak: 6741k -> 6749k
    Overhead: 9983k -> 9980k
    GGC runs: 504 -> 503

comparing combine.c compilation at -O2 level:
  Amount of memory still referenced at the end of compilation increased from 6573k to 6581k, overall 0.13%
    Overall memory needed: 29497k -> 29501k
    Peak memory use before GGC: 12657k -> 12663k
    Peak memory use after GGC: 12531k -> 12537k
    Maximum of released memory in single GGC run: 2550k -> 2551k
    Garbage: 79147k -> 79124k
    Leak: 6573k -> 6581k
    Overhead: 14084k -> 14082k
    GGC runs: 516 -> 515

comparing combine.c compilation at -O3 level:
    Overall memory needed: 20196k -> 20180k
    Peak memory use before GGC: 12785k -> 12793k
    Peak memory use after GGC: 12531k -> 12537k
    Maximum of released memory in single GGC run: 3348k
    Garbage: 106933k -> 106938k
    Leak: 7099k -> 7092k
    Overhead: 18878k -> 18876k
    GGC runs: 582 -> 581

comparing insn-attrtab.c compilation at -O0 level:
  Amount of memory still referenced at the end of compilation increased from 10951k to 10976k, overall 0.22%
    Overall memory needed: 114132k -> 114136k
    Peak memory use before GGC: 74735k -> 74739k
    Peak memory use after GGC: 45481k -> 45485k
    Maximum of released memory in single GGC run: 39341k -> 39340k
    Garbage: 152718k -> 152660k
    Leak: 10951k -> 10976k
    Overhead: 19974k -> 19969k
    GGC runs: 274 -> 273

comparing insn-attrtab.c compilation at -O1 level:
  Amount of memory still referenced at the end of compilation increased from 11328k to 11353k, overall 0.22%
    Overall memory needed: 124556k -> 124560k
    Peak memory use before GGC: 78743k -> 78748k
    Peak memory use after GGC: 70090k -> 70095k
    Maximum of released memory in single GGC run: 40765k
    Garbage: 367876k -> 367812k
    Leak: 11328k -> 11353k
    Overhead: 69568k -> 69563k
    GGC runs: 401 -> 399

comparing insn-attrtab.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 147340k to 148992k, overall 1.12%
  Amount of memory still referenced at the end of compilation increased from 11226k to 11238k, overall 0.11%
    Overall memory needed: 147340k -> 148992k
    Peak memory use before GGC: 98332k -> 98349k
    Peak memory use after GGC: 83449k -> 83466k
    Maximum of released memory in single GGC run: 39290k
    Garbage: 481150k -> 481104k
    Leak: 11226k -> 11238k
    Overhead: 84679k -> 84672k
    GGC runs: 342 -> 341

comparing insn-attrtab.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 11264k to 11276k, overall 0.11%
    Overall memory needed: 148972k -> 147352k
    Peak memory use before GGC: 98334k -> 98351k
    Peak memory use after GGC: 83450k -> 83467k
    Maximum of released memory in single GGC run: 39291k
    Garbage: 482193k -> 482146k
    Leak: 11264k -> 11276k
    Overhead: 84829k -> 84822k
    GGC runs: 348 -> 347

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111084k
    Peak memory use before GGC: 86882k -> 86879k
    Peak memory use after GGC: 85931k -> 85930k
    Maximum of released memory in single GGC run: 19284k -> 19282k
    Garbage: 246304k -> 245831k
    Leak: 55491k -> 55490k
    Overhead: 43348k -> 43290k
    GGC runs: 368 -> 366

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 103653k
    Peak memory use before GGC: 85964k -> 85962k
    Peak memory use after GGC: 84928k -> 84927k
    Maximum of released memory in single GGC run: 18947k -> 18946k
    Garbage: 446146k -> 445668k
    Leak: 56771k -> 56770k
    Overhead: 65597k -> 65542k
    GGC runs: 527

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 104677k -> 104689k
    Peak memory use before GGC: 85964k -> 85962k
    Peak memory use after GGC: 84929k -> 84927k
    Maximum of released memory in single GGC run: 18947k -> 18946k
    Garbage: 488826k -> 488445k
    Leak: 57400k -> 57399k
    Overhead: 75258k -> 75213k
    GGC runs: 586

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 112405k -> 112397k
    Peak memory use before GGC: 92702k -> 92701k
    Peak memory use after GGC: 86222k -> 86221k
    Maximum of released memory in single GGC run: 19712k
    Garbage: 504706k -> 504269k
    Leak: 57594k -> 57577k
    Overhead: 76956k -> 76897k
    GGC runs: 571 -> 570

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-01-29 14:31:51.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-01-29 21:00:54.000000000 +0000
@@ -1,3 +1,40 @@
+2005-01-29  Richard Guenther <richard.guenther@uni-tuebingen.de>
+
+	PR tree-optimization/15791
+	* fold-const.c (extract_array_ref): New function.
+	(fold): Fold comparisons between &a[i] and &a[j] or
+	semantically equivalent trees.
+
+2005-01-29  Jeff Law  <law@redhat.com>
+
+	* gcse.c (insert_expr_in_table): Revamp handling of available
+	and anticipatable occurrence lists to avoid unnecessary list
+	walking.
+	(insert_set_in_table): Similarly.
+
+2005-01-29  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* c-common.c (fix_string_type): Just use c_build_qualified_type to
+	build string type.
+	(c_build_qualified_type): Build qualified array types with
+	TYPE_MAIN_VARIANT pointing to corresponding unqualified type.
+	* c-decl.c (c_make_fname_decl): Build unqualified array type
+	before qualified type.
+	(grokdeclarator): Use TYPE_MAIN_VARIANT of typedef type if element
+	type is qualified, not just if type itself is.  Don't apply
+	qualifiers to array type when declarator is processed.  Apply
+	qualifiers to field type whether or not it is an array type.
+	Don't handle array types specially for applying qualifiers to
+	variables.
+	* c-typeck.c (composite_type): Build unqualified element type and
+	array type when forming composite of array types.
+	(common_pointer_type, comptypes, comp_target_types,
+	type_lists_compatible_p, build_indirect_ref, build_array_ref,
+	convert_for_assignment): Don't apply TYPE_MAIN_VARIANT to array
+	types.
+	(type_lists_compatible_p): Cache TREE_VALUE (args1) and TREE_VALUE
+	(args2) in variables a1 and a2.
+
 2005-01-29  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* cse.c (n_elements_made, max_elements_made): Remove.

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]