GCC memory consumption increased by recent patch!

gcctest@suse.de gcctest@suse.de
Mon Jan 3 09:22:00 GMT 2005


Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:


comparing combine.c compilation at -O0 level:
    Overall memory needed: 24393k -> 24389k
    Peak memory use before GGC: 9063k
    Peak memory use after GGC: 8377k
    Maximum of released memory in single GGC run: 2864k
    Garbage: 41736k
    Leak: 5862k
    Overhead: 5544k
    GGC runs: 352

comparing combine.c compilation at -O1 level:
    Overall memory needed: 25361k
    Peak memory use before GGC: 8951k
    Peak memory use after GGC: 8450k
    Maximum of released memory in single GGC run: 2024k
    Garbage: 66726k
    Leak: 6257k
    Overhead: 10310k
    GGC runs: 545

comparing combine.c compilation at -O2 level:
    Overall memory needed: 28845k -> 28853k
    Peak memory use before GGC: 12383k
    Peak memory use after GGC: 12257k
    Maximum of released memory in single GGC run: 2533k
    Garbage: 80657k
    Leak: 6081k
    Overhead: 14119k
    GGC runs: 546

comparing combine.c compilation at -O3 level:
    Overall memory needed: 31345k
    Peak memory use before GGC: 12635k
    Peak memory use after GGC: 12257k
    Maximum of released memory in single GGC run: 3347k
    Garbage: 109133k
    Leak: 6618k
    Overhead: 18983k
    GGC runs: 613

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 117268k
    Peak memory use before GGC: 77779k
    Peak memory use after GGC: 45259k
    Maximum of released memory in single GGC run: 42606k
    Garbage: 159302k
    Leak: 10432k
    Overhead: 20571k
    GGC runs: 294

comparing insn-attrtab.c compilation at -O1 level:
  Overall memory allocated via mmap and sbrk increased from 127820k to 128080k, overall 0.20%
    Overall memory needed: 127820k -> 128080k
    Peak memory use before GGC: 83296k
    Peak memory use after GGC: 69015k
    Maximum of released memory in single GGC run: 40616k
    Garbage: 441432k
    Leak: 10778k
    Overhead: 77163k
    GGC runs: 431

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 153120k -> 153252k
    Peak memory use before GGC: 99056k
    Peak memory use after GGC: 84176k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 487966k
    Leak: 10702k
    Overhead: 85263k
    GGC runs: 363

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 153132k -> 153128k
    Peak memory use before GGC: 99057k
    Peak memory use after GGC: 84178k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 489168k
    Leak: 10744k
    Overhead: 85423k
    GGC runs: 373

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 110796k
    Peak memory use before GGC: 86609k
    Peak memory use after GGC: 85641k
    Maximum of released memory in single GGC run: 19292k
    Garbage: 246468k
    Leak: 54976k
    Overhead: 43123k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 103705k
    Peak memory use before GGC: 85639k
    Peak memory use after GGC: 84690k
    Maximum of released memory in single GGC run: 18904k
    Garbage: 466427k
    Leak: 56722k
    Overhead: 66942k
    GGC runs: 553

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 103761k
    Peak memory use before GGC: 85639k
    Peak memory use after GGC: 84691k
    Maximum of released memory in single GGC run: 18904k
    Garbage: 500759k
    Leak: 57294k
    Overhead: 76404k
    GGC runs: 597

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 111445k -> 111449k
    Peak memory use before GGC: 92444k
    Peak memory use after GGC: 85893k
    Maximum of released memory in single GGC run: 19736k
    Garbage: 520652k
    Leak: 57627k
    Overhead: 78243k
    GGC runs: 579

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-01-03 02:50:27.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-01-03 08:20:40.000000000 +0000
@@ -1,3 +1,15 @@
+2005-01-03  Richard Henderson  <rth@redhat.com>
+	    Uros Bizjak  <uros@kss-loka.si>
+
+	PR target/14631
+	* config/i386/i386.c (ix86_expand_builtin): [IX86_BUILTIN_PINSRW,
+	IX86_BUILTIN_PINSRW128]: Fix wrong selector range in error message.
+	* config/i386/i386.md (mmx_pinsrw, sse2_pinsrw): Fix selector
+	handling.
+	(*mmx_pinsrw, *sse2_pinsrw): New patterns.
+	* config/i386/i386/predicates.md (const_pow2_1_to_8_operand,
+	const_pow2_1_to_128_operand): New predicates.
+
 2005-01-02  Greg McGary  <greg@mcgary.org>
 
 	* tree-mudflap.c (mf_varname_tree): decl_printable_name handles

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