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: 24765k
    Peak memory use before GGC: 8930k
    Peak memory use after GGC: 8565k
    Maximum of released memory in single GGC run: 2576k
    Garbage: 35002k
    Leak: 6058k
    Overhead: 4736k
    GGC runs: 296

comparing combine.c compilation at -O1 level:
    Overall memory needed: 36197k -> 36193k
    Peak memory use before GGC: 17003k
    Peak memory use after GGC: 16831k
    Maximum of released memory in single GGC run: 2265k -> 2264k
    Garbage: 54886k -> 54875k
    Leak: 6069k -> 6071k
    Overhead: 5754k -> 5752k
    GGC runs: 372

comparing combine.c compilation at -O2 level:
  Amount of memory still referenced at the end of compilation increased from 6173k to 6181k, overall 0.13%
    Overall memory needed: 26500k
    Peak memory use before GGC: 17000k
    Peak memory use after GGC: 16831k
    Maximum of released memory in single GGC run: 2254k
    Garbage: 78546k -> 78555k
    Leak: 6173k -> 6181k
    Overhead: 8279k -> 8280k
    GGC runs: 440

comparing combine.c compilation at -O3 level:
    Overall memory needed: 25596k
    Peak memory use before GGC: 18101k -> 18099k
    Peak memory use after GGC: 17437k -> 17435k
    Maximum of released memory in single GGC run: 3330k
    Garbage: 107587k -> 107588k
    Leak: 6253k
    Overhead: 11425k -> 11425k
    GGC runs: 486

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 83700k
    Peak memory use before GGC: 68249k
    Peak memory use after GGC: 43997k
    Maximum of released memory in single GGC run: 35709k
    Garbage: 126252k
    Leak: 9118k
    Overhead: 16889k
    GGC runs: 230

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 103608k -> 103088k
    Peak memory use before GGC: 83524k
    Peak memory use after GGC: 77617k
    Maximum of released memory in single GGC run: 31805k
    Garbage: 259523k
    Leak: 8930k
    Overhead: 28453k
    GGC runs: 232

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 105708k -> 105356k
    Peak memory use before GGC: 87821k
    Peak memory use after GGC: 79916k
    Maximum of released memory in single GGC run: 30384k
    Garbage: 305998k
    Leak: 8935k
    Overhead: 35479k
    GGC runs: 257

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 105392k
    Peak memory use before GGC: 87847k
    Peak memory use after GGC: 79943k
    Maximum of released memory in single GGC run: 30571k
    Garbage: 306588k
    Leak: 8938k
    Overhead: 35656k
    GGC runs: 261

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 116276k
    Peak memory use before GGC: 92434k
    Peak memory use after GGC: 91513k
    Maximum of released memory in single GGC run: 19648k
    Garbage: 199934k
    Leak: 47213k
    Overhead: 20482k
    GGC runs: 398

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 115244k
    Peak memory use before GGC: 97008k
    Peak memory use after GGC: 94816k
    Maximum of released memory in single GGC run: 18293k
    Garbage: 436510k -> 436505k
    Leak: 49029k
    Overhead: 31258k -> 31257k
    GGC runs: 551

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 115276k
    Peak memory use before GGC: 97009k
    Peak memory use after GGC: 94817k
    Maximum of released memory in single GGC run: 18292k
    Garbage: 522447k -> 522461k
    Leak: 49743k
    Overhead: 39342k -> 39343k
    GGC runs: 627

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 116616k
    Peak memory use before GGC: 98446k
    Peak memory use after GGC: 96093k
    Maximum of released memory in single GGC run: 18613k
    Garbage: 541435k -> 541460k
    Leak: 49722k
    Overhead: 40183k -> 40183k
    GGC runs: 638

comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
    Overall memory needed: 134136k
    Peak memory use before GGC: 81628k
    Peak memory use after GGC: 58507k
    Maximum of released memory in single GGC run: 45493k
    Garbage: 143524k
    Leak: 7142k
    Overhead: 25104k
    GGC runs: 87

comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
    Overall memory needed: 426132k -> 424404k
    Peak memory use before GGC: 201177k
    Peak memory use after GGC: 196173k
    Maximum of released memory in single GGC run: 95153k
    Garbage: 272370k
    Leak: 47195k
    Overhead: 30026k
    GGC runs: 105

comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
    Overall memory needed: 344700k -> 345276k
    Peak memory use before GGC: 208293k
    Peak memory use after GGC: 196536k
    Maximum of released memory in single GGC run: 96535k
    Garbage: 388087k
    Leak: 47779k
    Overhead: 47627k
    GGC runs: 111

comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
    Overall memory needed: 536244k
    Peak memory use before GGC: 314603k
    Peak memory use after GGC: 292947k
    Maximum of released memory in single GGC run: 163427k
    Garbage: 487440k
    Leak: 65111k
    Overhead: 58883k
    GGC runs: 100

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2006-08-23 01:08:03.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2006-08-23 23:51:42.000000000 +0000
@@ -1,3 +1,21 @@
+2006-08-24  Jan Hubicka  <jh@suse.cz>
+
+	* predict.c (probability_reliable_p): New predicate.
+	(edge_probability_reliable_p, br_prob_note_reliable_p): Likewise.
+	(predict_loops): Do not predict loop exit with less than 2%
+	probability.
+	* basic-block.h (edge_probability_reliable_p,
+	br_prob_note_reliable_p): Declare.
+	* ia64.h (ia64_print_operand): Do not disable on-chip branch
+	prediction when static predictor is not reliable.
+	* rs6000.c (output_cbranch): Likewise.
+
+2006-08-23  Stuart Hastings  <stuart@apple.com>
+
+	PR 28825
+	* gcc/config/i386/i386.c (ix86_expand_vector_init_duplicate,
+	ix86_expand_vector_init_one_nonzero): Remove TARGET_SSE test.
+
 2006-08-21  Geoffrey Keating  <geoffk@apple.com>
 
 	PR debug/28692
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2006-08-23 12:30:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2006-08-23 23:51:42.000000000 +0000
@@ -1,3 +1,9 @@
+2006-08-11   Benjamin Smedberg <benjamin@smedbergs.us>
+
+	PR c++/28687
+	* rtti.c (build_dynamic_cast, build_dynamic_cast_1):
+	Move -fno-rtti check to be more specific.
+
 2006-08-22  Jason Merrill  <jason@redhat.com>
 
 	PR c++/23372


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]