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 in some cases!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Fri, 15 Jul 2005 17:31:28 +0000
- Subject: A recent patch increased GCC's memory consumption in some cases!
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: 24729k -> 24733k
Peak memory use before GGC: 9591k
Peak memory use after GGC: 8938k
Maximum of released memory in single GGC run: 2754k
Garbage: 41378k
Leak: 6709k
Overhead: 5842k
GGC runs: 320
comparing combine.c compilation at -O1 level:
Amount of produced GGC garbage increased from 66037k to 66461k, overall 0.64%
Overall memory needed: 23924k -> 23916k
Peak memory use before GGC: 17374k
Peak memory use after GGC: 17181k
Maximum of released memory in single GGC run: 2418k -> 2421k
Garbage: 66037k -> 66461k
Leak: 7172k -> 7170k
Overhead: 7502k -> 7502k
GGC runs: 412
comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 84400k to 84832k, overall 0.51%
Overall memory needed: 23940k -> 23932k
Peak memory use before GGC: 17380k
Peak memory use after GGC: 17181k
Maximum of released memory in single GGC run: 2500k -> 2504k
Garbage: 84400k -> 84832k
Leak: 7410k
Overhead: 10035k -> 10034k
GGC runs: 482 -> 486
comparing combine.c compilation at -O3 level:
Amount of produced GGC garbage increased from 115625k to 115840k, overall 0.19%
Overall memory needed: 24436k -> 24416k
Peak memory use before GGC: 17649k -> 17657k
Peak memory use after GGC: 17261k
Maximum of released memory in single GGC run: 3340k
Garbage: 115625k -> 115840k
Leak: 7483k
Overhead: 13198k -> 13199k
GGC runs: 533 -> 537
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 81648k
Peak memory use before GGC: 70268k
Peak memory use after GGC: 45007k
Maximum of released memory in single GGC run: 37046k
Garbage: 149716k
Leak: 11585k
Overhead: 19128k
GGC runs: 252
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 115560k -> 115692k
Peak memory use before GGC: 98428k -> 98465k
Peak memory use after GGC: 87786k
Maximum of released memory in single GGC run: 32759k -> 32776k
Garbage: 295293k -> 295571k
Leak: 11547k
Overhead: 35276k -> 35277k
GGC runs: 282 -> 284
comparing insn-attrtab.c compilation at -O2 level:
Ovarall memory allocated via mmap and sbrk decreased from 129184k to 124848k, overall -3.47%
Overall memory needed: 129184k -> 124848k
Peak memory use before GGC: 117531k
Peak memory use after GGC: 87770k
Maximum of released memory in single GGC run: 32443k -> 32461k
Garbage: 381870k -> 382129k
Leak: 11662k
Overhead: 47147k -> 47146k
GGC runs: 319 -> 320
comparing insn-attrtab.c compilation at -O3 level:
Ovarall memory allocated via mmap and sbrk decreased from 129188k to 124852k, overall -3.47%
Overall memory needed: 129188k -> 124852k
Peak memory use before GGC: 117532k
Peak memory use after GGC: 87771k
Maximum of released memory in single GGC run: 32443k -> 32461k
Garbage: 382406k -> 382660k
Leak: 11678k
Overhead: 47296k -> 47295k
GGC runs: 323 -> 324
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119108k
Peak memory use before GGC: 95788k
Peak memory use after GGC: 94840k
Maximum of released memory in single GGC run: 20762k
Garbage: 224401k
Leak: 49424k
Overhead: 36944k
GGC runs: 339
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 596296k to 597552k, overall 0.21%
Overall memory needed: 104976k -> 105004k
Peak memory use before GGC: 94848k
Peak memory use after GGC: 93906k
Maximum of released memory in single GGC run: 19825k
Garbage: 596296k -> 597552k
Leak: 55415k -> 55415k
Overhead: 64301k -> 64302k
GGC runs: 519 -> 520
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 678326k to 679610k, overall 0.19%
Overall memory needed: 105168k -> 105140k
Peak memory use before GGC: 94848k
Peak memory use after GGC: 93906k
Maximum of released memory in single GGC run: 19825k
Garbage: 678326k -> 679610k
Leak: 56294k -> 56310k
Overhead: 75367k -> 75396k
GGC runs: 589 -> 592
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 720745k to 722393k, overall 0.23%
Overall memory needed: 106796k -> 106840k
Peak memory use before GGC: 95930k
Peak memory use after GGC: 94979k
Maximum of released memory in single GGC run: 19927k
Garbage: 720745k -> 722393k
Leak: 56804k -> 56821k
Overhead: 78522k -> 78531k
GGC runs: 603
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-07-15 10:39:25.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-07-15 16:27:53.000000000 +0000
@@ -1,3 +1,11 @@
+2005-07-13 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/22376
+ * tree-ssa-structalias.c (build_constraint_graph): We really meant
+ special var here.
+ (need_to_solve): New function.
+ (compute_points_to_sets): Use it.
+
2005-07-15 Jan Hubicka <jh@suse.cz>
* cfg.c (update_bb_profile_for_threading): More diagnostic.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-07-13 21:56:44.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-07-15 16:27:54.000000000 +0000
@@ -1,3 +1,21 @@
+2005-07-15 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/22132
+ * call.c (implicit_conversion): Add c_cast_p parameter.
+ (standard_conversion): Likewise. Allow conversions between
+ differently-qualified pointer types when performing a C-style
+ cast.
+ (add_function_candidate): Adjust callee.
+ (build_builtin_candidate): Likewise.
+ (build_user_type_conversion_1): Likewise.
+ (conditional_conversion): Likewise.
+ (can_convert_arg): Likewise.
+ (can_convert_arg_bad): Likewise.
+ (perform_implicit_conversion): Likewise.
+ * cp-tree.h (comp_ptr_ttypes_const): Declare.
+ * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
+ Return bool.
+
2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
Nathan Sidwell <nathan@codesourcery.com>
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.