A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Oct 11 23:56:00 GMT 2007
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 empty function compilation at -O0 level:
Overall memory needed: 7041k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1079k
Maximum of released memory in single GGC run: 126k
Garbage: 249k
Leak: 1084k
Overhead: 141k
GGC runs: 4
comparing empty function compilation at -O0 -g level:
Overall memory needed: 7057k
Peak memory use before GGC: 1207k
Peak memory use after GGC: 1107k
Maximum of released memory in single GGC run: 128k
Garbage: 252k
Leak: 1116k
Overhead: 145k
GGC runs: 4
comparing empty function compilation at -O1 level:
Overall memory needed: 7097k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1071k
Maximum of released memory in single GGC run: 121k
Garbage: 251k
Leak: 1084k
Overhead: 141k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 7101k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1072k
Maximum of released memory in single GGC run: 121k
Garbage: 255k
Leak: 1085k
Overhead: 142k
GGC runs: 3
comparing empty function compilation at -O3 level:
Overall memory needed: 7101k
Peak memory use before GGC: 1180k
Peak memory use after GGC: 1072k
Maximum of released memory in single GGC run: 121k
Garbage: 255k
Leak: 1085k
Overhead: 142k
GGC runs: 3
comparing combine.c compilation at -O0 level:
Overall memory needed: 22033k -> 22037k
Peak memory use before GGC: 8285k
Peak memory use after GGC: 7624k
Maximum of released memory in single GGC run: 1580k
Garbage: 38810k -> 38815k
Leak: 6169k -> 6168k
Overhead: 5021k -> 5023k
GGC runs: 369
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24045k -> 24049k
Peak memory use before GGC: 10115k
Peak memory use after GGC: 9389k -> 9393k
Maximum of released memory in single GGC run: 1875k
Garbage: 39134k -> 39157k
Leak: 8996k -> 9002k
Overhead: 5693k -> 5695k
GGC runs: 343 -> 342
comparing combine.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 6308k to 6321k, overall 0.20%
Overall memory needed: 33113k -> 33117k
Peak memory use before GGC: 17056k -> 17064k
Peak memory use after GGC: 16868k -> 16877k
Maximum of released memory in single GGC run: 1379k
Garbage: 52438k -> 52446k
Leak: 6308k -> 6321k
Overhead: 6002k -> 6007k
GGC runs: 440
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 6639k to 6652k, overall 0.19%
Overall memory needed: 35373k -> 35377k
Peak memory use before GGC: 17127k -> 17135k
Peak memory use after GGC: 16957k -> 16965k
Maximum of released memory in single GGC run: 1335k
Garbage: 71353k -> 71359k
Leak: 6639k -> 6652k
Overhead: 8254k -> 8260k
GGC runs: 507 -> 508
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 6750k to 6770k, overall 0.31%
Overall memory needed: 38817k -> 38813k
Peak memory use before GGC: 17337k -> 17346k
Peak memory use after GGC: 17010k -> 17019k
Maximum of released memory in single GGC run: 2130k -> 2131k
Garbage: 92739k -> 92752k
Leak: 6750k -> 6770k
Overhead: 10759k -> 10765k
GGC runs: 537 -> 538
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 138153k -> 138157k
Peak memory use before GGC: 58644k
Peak memory use after GGC: 32137k
Maximum of released memory in single GGC run: 34144k
Garbage: 131586k -> 131597k
Leak: 8909k -> 8915k
Overhead: 14830k -> 14833k
GGC runs: 295
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 139409k
Peak memory use before GGC: 59793k
Peak memory use after GGC: 33286k
Maximum of released memory in single GGC run: 34144k
Garbage: 132063k -> 132073k
Leak: 10345k -> 10351k
Overhead: 15211k -> 15214k
GGC runs: 291
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 146181k -> 146177k
Peak memory use before GGC: 57137k -> 57141k
Peak memory use after GGC: 50907k -> 50911k
Maximum of released memory in single GGC run: 24233k -> 24232k
Garbage: 212481k -> 212493k
Leak: 9801k -> 9807k
Overhead: 24835k -> 24838k
GGC runs: 319
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 187045k -> 186945k
Peak memory use before GGC: 57772k -> 57776k
Peak memory use after GGC: 52500k -> 52504k
Maximum of released memory in single GGC run: 22973k
Garbage: 253948k -> 253959k
Leak: 10889k -> 10895k
Overhead: 30581k -> 30584k
GGC runs: 350
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 194257k -> 194069k
Peak memory use before GGC: 69771k -> 69775k
Peak memory use after GGC: 63204k -> 63208k
Maximum of released memory in single GGC run: 23494k -> 23493k
Garbage: 281995k -> 282006k
Leak: 10925k -> 10931k
Overhead: 32460k -> 32463k
GGC runs: 356
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 155559k -> 155507k
Peak memory use before GGC: 89791k
Peak memory use after GGC: 88898k
Maximum of released memory in single GGC run: 18065k
Garbage: 210253k
Leak: 53116k
Overhead: 26499k
GGC runs: 418
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 174659k -> 174655k
Peak memory use before GGC: 101236k
Peak memory use after GGC: 100233k
Maximum of released memory in single GGC run: 18252k
Garbage: 215845k
Leak: 74940k
Overhead: 31908k
GGC runs: 392
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121331k
Peak memory use before GGC: 88659k
Peak memory use after GGC: 87777k
Maximum of released memory in single GGC run: 17321k
Garbage: 292929k
Leak: 52381k
Overhead: 30263k
GGC runs: 512
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 126339k
Peak memory use before GGC: 88759k
Peak memory use after GGC: 87878k
Maximum of released memory in single GGC run: 17318k
Garbage: 359411k
Leak: 53383k
Overhead: 37235k
GGC runs: 592
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 130759k -> 130763k
Peak memory use before GGC: 89976k
Peak memory use after GGC: 89081k
Maximum of released memory in single GGC run: 17674k
Garbage: 391621k
Leak: 53812k
Overhead: 39963k
GGC runs: 613
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 379340k
Peak memory use before GGC: 101510k
Peak memory use after GGC: 57163k
Maximum of released memory in single GGC run: 50582k
Garbage: 179454k
Leak: 6299k
Overhead: 30876k
GGC runs: 105
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 380144k
Peak memory use before GGC: 102144k
Peak memory use after GGC: 57797k
Maximum of released memory in single GGC run: 50583k
Garbage: 179559k
Leak: 8007k
Overhead: 31342k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Amount of produced GGC garbage increased from 236192k to 237341k, overall 0.49%
Amount of memory still referenced at the end of compilation increased from 15698k to 16597k, overall 5.72%
Overall memory needed: 392905k -> 395937k
Peak memory use before GGC: 81062k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 40265k
Garbage: 236192k -> 237341k
Leak: 15698k -> 16597k
Overhead: 31631k -> 34424k
GGC runs: 103
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Amount of produced GGC garbage increased from 246253k to 247405k, overall 0.47%
Amount of memory still referenced at the end of compilation increased from 15788k to 16685k, overall 5.68%
Overall memory needed: 297081k -> 298721k
Peak memory use before GGC: 78187k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 33868k
Garbage: 246253k -> 247405k
Leak: 15788k -> 16685k
Overhead: 33704k -> 37428k
GGC runs: 116
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1312417k -> 1312617k
Peak memory use before GGC: 136332k
Peak memory use after GGC: 126665k
Maximum of released memory in single GGC run: 68197k
Garbage: 364426k
Leak: 26574k
Overhead: 46311k
GGC runs: 102
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-10-11 02:43:25.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-10-11 20:19:14.000000000 +0000
@@ -1,3 +1,41 @@
+2007-10-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (AX_REG, BX_REG, CX_REG): New constants.
+ * config/i386/i386.c (ix86_function_arg_regno_p, function_arg_32,
+ function_value_32, function_value_64, function_value_ms_64,
+ setup_incoming_varargs_64, ix86_expand_prologue, ix86_expand_call,
+ legitimize_tls_address, x86_this_parameter, x86_output_mi_thunk):
+ Use new constants.
+
+2007-10-11 Richard Guenther <rguenther@suse.de>
+
+ * gcse.c (hash_scan_set): If the next nonnote insn is in
+ a different basic block insert the set.
+
+2007-10-11 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/33724
+ * tree-cfg.c (one_pointer_to_useless_type_conversion_p): New function.
+ (verify_gimple_expr): Use it to verify pointer-to types for
+ ADDR_EXPRs.
+
+2007-10-11 Richard Guenther <rguenther@suse.de>
+
+ PR c/33726
+ * c-typeck.c (build_array_ref): Do not strip qualifiers from
+ the array element type.
+
+2007-10-11 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR rtl-optimization/33638
+ * dse.c (struct insn_info): Remove 'stack_read' field,
+ add 'stack_pointer_based' field.
+ (record_store): For a store with non-constant base, record
+ whether it is stack pointer based.
+ (scan_insn): For the call to a const function, remove stack
+ pointer based stores from the list of local active stores.
+ (scan_reads_nospill): Delete code dealing with const functions.
+
2007-10-10 Peter Bergner <bergner@vnet.ibm.com>
* ra-conflict.c (partial_bitnum, max_bitnum): Change type of variables
@@ -492,6 +530,7 @@
* ra.h: New file.
* reload.c (push_reload, find_dummy_reload): Change DF_RA_LIVE
usage to DF_LIVE usage.
+ (reload): Remove reference to df_get_live_top.
* rtlanal.c (subreg_nregs_with_regno): New function.
* df-scan.c (df_def_record_1, df_uses_record): Add code to set
DF_REF_EXTRACT, DF_REF_STRICT_LOWER_PART, and DF_REF_SUBREG flags.
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2007-10-08 22:14:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2007-10-11 20:19:13.000000000 +0000
@@ -1,3 +1,13 @@
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/33461
+ * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
+ to convert_template_argument.
+ (coerce_template_parms): Return error_mark_node after fixed-length
+ error.
+ (tsubst_decl): Check for error_mark_node the return value of the
+ first tsubst in 'case VAR_DECL'.
+
2007-10-08 Ollie Wild <aaw@google.com>
* typeck2.c (digest_init): Call cplus_expand_constant after
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.
More information about the Gcc-regression
mailing list