A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Wed Oct 10 12:43: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: 7027k
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: 7043k
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: 7083k -> 7087k
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: 7103k
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: 7103k
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: 22035k
Peak memory use before GGC: 8285k
Peak memory use after GGC: 7624k
Maximum of released memory in single GGC run: 1580k
Garbage: 38810k
Leak: 6169k
Overhead: 5021k
GGC runs: 369
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 24043k
Peak memory use before GGC: 10115k
Peak memory use after GGC: 9389k
Maximum of released memory in single GGC run: 1875k
Garbage: 39134k
Leak: 8996k
Overhead: 5693k
GGC runs: 343
comparing combine.c compilation at -O1 level:
Overall memory needed: 33103k
Peak memory use before GGC: 17056k
Peak memory use after GGC: 16868k
Maximum of released memory in single GGC run: 1379k
Garbage: 52438k
Leak: 6308k
Overhead: 6002k
GGC runs: 440
comparing combine.c compilation at -O2 level:
Overall memory needed: 35371k
Peak memory use before GGC: 17127k
Peak memory use after GGC: 16957k
Maximum of released memory in single GGC run: 1335k
Garbage: 71353k
Leak: 6639k
Overhead: 8254k
GGC runs: 507
comparing combine.c compilation at -O3 level:
Overall memory needed: 38815k
Peak memory use before GGC: 17337k
Peak memory use after GGC: 17010k
Maximum of released memory in single GGC run: 2130k
Garbage: 92739k
Leak: 6750k
Overhead: 10759k
GGC runs: 537
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 138159k
Peak memory use before GGC: 58644k
Peak memory use after GGC: 32137k
Maximum of released memory in single GGC run: 34144k
Garbage: 131586k
Leak: 8909k
Overhead: 14830k
GGC runs: 295
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 139403k -> 139407k
Peak memory use before GGC: 59793k
Peak memory use after GGC: 33286k
Maximum of released memory in single GGC run: 34144k
Garbage: 132063k
Leak: 10345k
Overhead: 15211k
GGC runs: 291
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 146167k -> 146159k
Peak memory use before GGC: 57137k
Peak memory use after GGC: 50907k
Maximum of released memory in single GGC run: 24233k
Garbage: 212481k
Leak: 9801k
Overhead: 24835k
GGC runs: 319
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 187051k -> 186939k
Peak memory use before GGC: 57772k
Peak memory use after GGC: 52500k
Maximum of released memory in single GGC run: 22973k
Garbage: 253948k
Leak: 10889k
Overhead: 30581k
GGC runs: 350
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 194255k -> 194063k
Peak memory use before GGC: 69771k
Peak memory use after GGC: 63204k
Maximum of released memory in single GGC run: 23494k
Garbage: 281995k
Leak: 10925k
Overhead: 32460k
GGC runs: 356
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 155519k -> 155503k
Peak memory use before GGC: 89791k
Peak memory use after GGC: 88898k
Maximum of released memory in single GGC run: 18065k
Garbage: 210359k -> 210253k
Leak: 53116k
Overhead: 26511k -> 26499k
GGC runs: 418
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 174663k -> 174659k
Peak memory use before GGC: 101236k
Peak memory use after GGC: 100233k
Maximum of released memory in single GGC run: 18252k
Garbage: 215953k -> 215845k
Leak: 74940k
Overhead: 31919k -> 31908k
GGC runs: 392
comparing Gerald's testcase PR8361 compilation at -O1 level:
Amount of produced GGC garbage increased from 292167k to 292929k, overall 0.26%
Overall memory needed: 121280k -> 121332k
Peak memory use before GGC: 88659k
Peak memory use after GGC: 87777k
Maximum of released memory in single GGC run: 17321k
Garbage: 292167k -> 292929k
Leak: 52378k -> 52381k
Overhead: 30191k -> 30263k
GGC runs: 511 -> 512
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 357923k to 359411k, overall 0.42%
Overall memory needed: 126412k -> 126340k
Peak memory use before GGC: 88759k
Peak memory use after GGC: 87878k
Maximum of released memory in single GGC run: 17318k
Garbage: 357923k -> 359411k
Leak: 53383k -> 53383k
Overhead: 37099k -> 37235k
GGC runs: 591 -> 592
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 389623k to 391621k, overall 0.51%
Overall memory needed: 130872k -> 130764k
Peak memory use before GGC: 89976k
Peak memory use after GGC: 89081k
Maximum of released memory in single GGC run: 17674k
Garbage: 389623k -> 391621k
Leak: 53806k -> 53812k
Overhead: 39816k -> 39963k
GGC runs: 611 -> 613
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 379337k
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: 380145k
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:
Overall memory needed: 392895k
Peak memory use before GGC: 81062k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 40265k
Garbage: 236192k
Leak: 15698k
Overhead: 31631k
GGC runs: 103
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 296851k -> 296951k
Peak memory use before GGC: 78187k
Peak memory use after GGC: 73201k
Maximum of released memory in single GGC run: 33868k
Garbage: 246253k
Leak: 15788k
Overhead: 33704k
GGC runs: 116
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1314279k -> 1311927k
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-09 15:41:56.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-10-10 09:08:51.000000000 +0000
@@ -1,6 +1,56 @@
2007-10-09 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/33669
+ * ra-conflict.c (record_one_conflict_between_regnos,
+ set_conflicts_for_earlyclobber, global_conflicts): Improved logging.
+ (global_conflicts): Enhanced incorrect check.
+
+2007-10-09 Geoffrey Keating <geoffk@apple.com>
+
+ * dwarf2out.c (output_call_frame_info): FDEs are always emitted
+ if flag_exceptions is not set.
+ * config/darwin.c (darwin_emit_unwind_label): Rewrite to use
+ assemble_name rather than incorrectly emulating it.
+
+ * doc/extend.texi (Deprecated Features): Mention that <? and >? and
+ friends are removed from G++.
+
+2007-10-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ * c-opts.c (c_common_handle_option): -Wnontemplate-friend,
+ -Wwrite-strings and -Wmultichar are enabled by default, so Wall
+ enabling them is redundant. Don't check two times for
+ c_dialect_cxx.
+
+2007-10-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ra-conflict.c (record_one_conflict_between_regnos): Revert
+ the last change.
+ (set_conflicts_for_earlyclobber): Likewise.
+ (global_conflicts): Likewise.
+
+2007-10-09 Kazu Hirata <kazu@codesourcery.com>
+
+ * longlong.h (count_leading_zeros): Replace '{' and '}' with '%{'
+ and '%}', respectively.
+
+2007-10-09 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/m68k/m68k.c (print_operand): Handle '{' and '}'.
+ * config/m68k/m68k.h (PRINT_OPERAND_PUNCT_VALID_P): Accept '{'
+ and '}'.
+ * config/m68k/m68k.md: Replace '{' with '%{' where '{' is
+ meant to be output.
+
+2007-10-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/33692
+ * gimplify.c (canonicalize_component_ref): Honor qualifiers
+ of referenced structure and component.
+
+2007-10-09 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/33669
* ra-conflict.c (record_one_conflict_between_regnos,
set_conflicts_for_earlyclobber, global_conflicts): Improved
logging.
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