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:
    Overall memory needed: 24777k
    Peak memory use before GGC: 9345k
    Peak memory use after GGC: 8659k
    Maximum of released memory in single GGC run: 2864k
    Garbage: 41727k
    Leak: 6379k
    Overhead: 5777k
    GGC runs: 329

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26213k
    Peak memory use before GGC: 9233k
    Peak memory use after GGC: 8732k
    Maximum of released memory in single GGC run: 2026k
    Garbage: 66612k
    Leak: 6774k
    Overhead: 10525k
    GGC runs: 518

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29529k
    Peak memory use before GGC: 12665k
    Peak memory use after GGC: 12540k
    Maximum of released memory in single GGC run: 2533k
    Garbage: 80588k
    Leak: 6600k
    Overhead: 14342k
    GGC runs: 520

comparing combine.c compilation at -O3 level:
    Overall memory needed: 20196k
    Peak memory use before GGC: 12919k
    Peak memory use after GGC: 12540k
    Maximum of released memory in single GGC run: 3347k
    Garbage: 109074k
    Leak: 7135k
    Overhead: 19205k
    GGC runs: 585

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 117548k
    Peak memory use before GGC: 78061k
    Peak memory use after GGC: 45541k
    Maximum of released memory in single GGC run: 42606k
    Garbage: 159286k
    Leak: 10949k
    Overhead: 20803k
    GGC runs: 274

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 128704k
    Peak memory use before GGC: 83579k
    Peak memory use after GGC: 69298k
    Maximum of released memory in single GGC run: 40617k
    Garbage: 441383k
    Leak: 11295k
    Overhead: 77391k
    GGC runs: 406

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 153408k -> 153544k
    Peak memory use before GGC: 99340k
    Peak memory use after GGC: 84460k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 487922k
    Leak: 11219k
    Overhead: 85491k
    GGC runs: 342

comparing insn-attrtab.c compilation at -O3 level:
  Overall memory allocated via mmap and sbrk increased from 150552k to 152176k, overall 1.08%
    Overall memory needed: 150552k -> 152176k
    Peak memory use before GGC: 99341k
    Peak memory use after GGC: 84462k
    Maximum of released memory in single GGC run: 41525k
    Garbage: 489113k
    Leak: 11261k
    Overhead: 85649k
    GGC runs: 349

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111088k
    Peak memory use before GGC: 86883k
    Peak memory use after GGC: 85932k
    Maximum of released memory in single GGC run: 19284k
    Garbage: 246367k
    Leak: 55491k
    Overhead: 43354k
    GGC runs: 367

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 104733k
    Peak memory use before GGC: 85965k
    Peak memory use after GGC: 84929k
    Maximum of released memory in single GGC run: 18947k
    Garbage: 466109k
    Leak: 57238k
    Overhead: 67141k
    GGC runs: 550

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 104805k
    Peak memory use before GGC: 85965k
    Peak memory use after GGC: 84929k
    Maximum of released memory in single GGC run: 18947k
    Garbage: 500465k
    Leak: 57818k
    Overhead: 76609k
    GGC runs: 594

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 101356k
    Peak memory use before GGC: 92703k
    Peak memory use after GGC: 86223k
    Maximum of released memory in single GGC run: 19713k
    Garbage: 520396k
    Leak: 58142k
    Overhead: 78452k
    GGC runs: 578

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-01-16 02:41:54.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-01-16 17:10:20.000000000 +0000
@@ -1,3 +1,18 @@
+2005-01-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	PR target/16304
+	* defaults.h (TARGET_DEFERRED_OUTPUT_DEFS): Provide default.
+	* toplev.c (compile_file): Call process_pending_assemble_output_defs
+	just before targetm.asm_out.file_end.
+	* tree.h (process_pending_assemble_output_defs): Declare.
+	* varasm.c (assemble_output_def, process_pending_assemble_output_defs):
+	New functions.
+	(assemble_alias): Defer generation of assembly code for defines when
+	TARGET_DEFERRED_OUTPUT_DEFS is true.
+	* config/rs6000/aix41.h (TARGET_DEFERRED_OUTPUT_DEFS): Define.
+	* config/rs6000/aix43.h (TARGET_DEFERRED_OUTPUT_DEFS): Define.
+	* doc/tm.texi (TARGET_DEFERRED_OUTPUT_DEFS): document.
+
 2005-01-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 	PR target/19336

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]