This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased GCC's memory consumption!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Sat, 04 Nov 2006 03:13:32 +0000
- Subject: 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: 28370k
Peak memory use before GGC: 9293k
Peak memory use after GGC: 8832k
Maximum of released memory in single GGC run: 2666k
Garbage: 36856k
Leak: 6441k
Overhead: 4860k
GGC runs: 280
comparing combine.c compilation at -O1 level:
Overall memory needed: 40210k
Peak memory use before GGC: 17281k
Peak memory use after GGC: 17106k
Maximum of released memory in single GGC run: 2382k
Garbage: 57445k
Leak: 6505k
Overhead: 6200k
GGC runs: 355
comparing combine.c compilation at -O2 level:
Overall memory needed: 29790k
Peak memory use before GGC: 17277k
Peak memory use after GGC: 17106k
Maximum of released memory in single GGC run: 2883k
Garbage: 76254k
Leak: 6593k
Overhead: 8744k
GGC runs: 420
comparing combine.c compilation at -O3 level:
Overall memory needed: 28894k
Peak memory use before GGC: 18217k
Peak memory use after GGC: 17833k
Maximum of released memory in single GGC run: 4104k
Garbage: 106198k
Leak: 6668k
Overhead: 12303k
GGC runs: 469
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 88230k
Peak memory use before GGC: 69777k
Peak memory use after GGC: 44187k
Maximum of released memory in single GGC run: 36963k
Garbage: 129065k
Leak: 9501k
Overhead: 16993k
GGC runs: 216
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114182k -> 114174k
Peak memory use before GGC: 90363k
Peak memory use after GGC: 83725k
Maximum of released memory in single GGC run: 31806k
Garbage: 277740k
Leak: 9343k
Overhead: 29775k
GGC runs: 223
comparing insn-attrtab.c compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 129334k to 134058k, overall 3.65%
Overall memory needed: 129334k -> 134058k
Peak memory use before GGC: 92593k
Peak memory use after GGC: 84705k
Maximum of released memory in single GGC run: 30380k
Garbage: 319045k
Leak: 9345k
Overhead: 36716k
GGC runs: 247
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 115570k
Peak memory use before GGC: 92618k
Peak memory use after GGC: 84731k
Maximum of released memory in single GGC run: 30570k
Garbage: 319697k
Leak: 9348k
Overhead: 36914k
GGC runs: 250
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119502k -> 119538k
Peak memory use before GGC: 92646k -> 92680k
Peak memory use after GGC: 91729k -> 91760k
Maximum of released memory in single GGC run: 19299k -> 19314k
Garbage: 205559k -> 205600k
Leak: 47677k
Overhead: 20816k -> 20817k
GGC runs: 402
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119242k -> 119278k
Peak memory use before GGC: 97832k -> 97848k
Peak memory use after GGC: 95623k -> 95638k
Maximum of released memory in single GGC run: 18569k -> 18600k
Garbage: 444257k -> 444357k
Leak: 50010k
Overhead: 32813k -> 32820k
GGC runs: 552
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119250k -> 119286k
Peak memory use before GGC: 97832k -> 97848k
Peak memory use after GGC: 95622k -> 95638k
Maximum of released memory in single GGC run: 18570k -> 18600k
Garbage: 505913k -> 506005k
Leak: 50715k -> 50715k
Overhead: 40462k -> 40490k
GGC runs: 610
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 118938k -> 118930k
Peak memory use before GGC: 97879k -> 97894k
Peak memory use after GGC: 96909k -> 96924k
Maximum of released memory in single GGC run: 18832k -> 18847k
Garbage: 525475k -> 525605k
Leak: 50292k -> 50291k
Overhead: 40990k -> 40993k
GGC runs: 624 -> 623
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137946k
Peak memory use before GGC: 81898k
Peak memory use after GGC: 58777k
Maximum of released memory in single GGC run: 45493k
Garbage: 147195k
Leak: 7522k
Overhead: 25300k
GGC runs: 83
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 424470k -> 424310k
Peak memory use before GGC: 205260k
Peak memory use after GGC: 201036k
Maximum of released memory in single GGC run: 101716k
Garbage: 271708k
Leak: 47588k
Overhead: 30829k
GGC runs: 101
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 350966k -> 351126k
Peak memory use before GGC: 206011k
Peak memory use after GGC: 201787k
Maximum of released memory in single GGC run: 108042k
Garbage: 350433k
Leak: 48171k
Overhead: 46275k
GGC runs: 108
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 535282k -> 535350k
Peak memory use before GGC: 314918k
Peak memory use after GGC: 293261k
Maximum of released memory in single GGC run: 163448k
Garbage: 491202k
Leak: 65503k
Overhead: 59091k
GGC runs: 95
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-11-03 18:32:21.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-11-04 01:44:35.000000000 +0000
@@ -1,3 +1,20 @@
+2006-11-03 Steven Bosscher <steven@gcc.gnu.org>
+
+ * tree-dump.c (dump_enable_all): Rename local variable
+ ir_type to avoid name conflicts.
+ * cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
+ instead of using ir_type().
+ * profile.c (tree_register_profile_hooks): Likewise.
+ * value-prof.c (tree_register_value_prof_hooks): Likewise.
+ * basic-block.h (struct edge_def): Likewise.
+ * config/arm/arm.c (legitimize_pic_address): Likewise.
+ * coretypes.h (ir_type): New enum of all intermediate languages
+ used in GCC.
+ * cfghooks.c (ir_type): Rename to...
+ (current_ir_type): ...this. Distinguish between cfgrtl and
+ cfglayout mode when the current IR is RTL. Return enum ir_type.
+ * cfghooks.h (ir_type): Replace with current_ir_type prototype.
+
2006-11-03 Paul Brook <paul@codesourcery.com>
gcc/
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2006-11-01 12:06:02.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2006-11-04 01:44:34.000000000 +0000
@@ -1,3 +1,14 @@
+2006-11-03 Roger Sayle <roger@eyesopen.com>
+
+ * call.c (build_op_delete_call): Test user-visible type against
+ size_type_node, instead of against the internal type, sizetype.
+ * class.c (type_requires_array_cookie): Likewise.
+ * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
+ handling of TYPE_IS_SIZETYPE.
+ * typeck.c (type_after_usual_arithmetic_conversions): Remove
+ special case handling of TYPE_IS_SIZETYPE.
+ (comptypes): Likewise.
+
2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
* decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
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.