A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Mon Feb 6 15:31:00 GMT 2006
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: 25320k -> 25324k
Peak memory use before GGC: 9566k
Peak memory use after GGC: 8913k
Maximum of released memory in single GGC run: 2649k
Garbage: 40060k
Leak: 6740k
Overhead: 5738k
GGC runs: 313
comparing combine.c compilation at -O1 level:
Overall memory needed: 26892k
Peak memory use before GGC: 17434k
Peak memory use after GGC: 17255k
Maximum of released memory in single GGC run: 2309k
Garbage: 62589k
Leak: 6889k
Overhead: 7488k
GGC runs: 393
comparing combine.c compilation at -O2 level:
Amount of produced GGC garbage increased from 80093k to 83409k, overall 4.14%
Amount of memory still referenced at the end of compilation increased from 6962k to 6977k, overall 0.21%
Overall memory needed: 26892k
Peak memory use before GGC: 17436k
Peak memory use after GGC: 17255k
Maximum of released memory in single GGC run: 2388k -> 2410k
Garbage: 80093k -> 83409k
Leak: 6962k -> 6977k
Overhead: 10032k -> 10316k
GGC runs: 450 -> 451
comparing combine.c compilation at -O3 level:
Peak amount of GGC memory allocated before garbage collecting increased from 18273k to 18414k, overall 0.77%
Peak amount of GGC memory still allocated after garbage collectin increased from 17952k to 17970k, overall 0.10%
Amount of produced GGC garbage increased from 111389k to 115499k, overall 3.69%
Overall memory needed: 26892k
Peak memory use before GGC: 18273k -> 18414k
Peak memory use after GGC: 17952k -> 17970k
Maximum of released memory in single GGC run: 3378k -> 3385k
Garbage: 111389k -> 115499k
Leak: 7038k -> 7040k
Overhead: 13723k -> 14088k
GGC runs: 502
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80948k
Peak memory use before GGC: 69508k
Peak memory use after GGC: 45044k
Maximum of released memory in single GGC run: 36220k
Garbage: 146427k
Leak: 10131k
Overhead: 19750k
GGC runs: 247
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 109164k -> 109560k
Peak memory use before GGC: 91973k
Peak memory use after GGC: 81071k
Maximum of released memory in single GGC run: 32143k
Garbage: 296462k
Leak: 10054k
Overhead: 36102k
GGC runs: 245
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 122560k
Peak memory use before GGC: 109356k
Peak memory use after GGC: 80974k
Maximum of released memory in single GGC run: 31578k
Garbage: 381018k -> 381029k
Leak: 10156k
Overhead: 47871k -> 47872k
GGC runs: 274
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 122616k
Peak memory use before GGC: 109382k
Peak memory use after GGC: 80999k
Maximum of released memory in single GGC run: 31908k
Garbage: 381619k -> 381630k
Leak: 10160k
Overhead: 48068k -> 48069k
GGC runs: 276
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118424k
Peak memory use before GGC: 95198k
Peak memory use after GGC: 94250k
Maximum of released memory in single GGC run: 20356k
Garbage: 223714k
Leak: 49472k
Overhead: 37113k
GGC runs: 369
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 108528k
Peak memory use before GGC: 95331k
Peak memory use after GGC: 93251k
Maximum of released memory in single GGC run: 20233k
Garbage: 565076k
Leak: 52291k
Overhead: 63655k
GGC runs: 531
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 655144k to 690223k, overall 5.35%
Amount of memory still referenced at the end of compilation increased from 53114k to 53426k, overall 0.59%
Overall memory needed: 108532k
Peak memory use before GGC: 95331k
Peak memory use after GGC: 93252k
Maximum of released memory in single GGC run: 20232k
Garbage: 655144k -> 690223k
Leak: 53114k -> 53426k
Overhead: 74999k -> 77124k
GGC runs: 594 -> 617
comparing Gerald's testcase PR8361 compilation at -O3 level:
Amount of produced GGC garbage increased from 715025k to 753221k, overall 5.34%
Amount of memory still referenced at the end of compilation increased from 53992k to 54359k, overall 0.68%
Overall memory needed: 114216k -> 114280k
Peak memory use before GGC: 96797k
Peak memory use after GGC: 94327k
Maximum of released memory in single GGC run: 20729k
Garbage: 715025k -> 753221k
Leak: 53992k -> 54359k
Overhead: 79548k -> 81858k
GGC runs: 606 -> 626
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-02-06 05:01:16.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-02-06 15:23:10.000000000 +0000
@@ -1,4 +1,34 @@
-2006-02-04 Ben Elliston <bje@au.ibm.com>
+2006-02-06 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-ssa-pre.c (bb_value_sets_t): Add antic_safe_loads.
+ (ANTIC_SAFE_LOADS): New macro.
+ (find_or_generate_expression): Add prototype.
+ (set_contains_value): Allow null set for sake of not always having
+ to allocate ANTIC_SAFE_LOADS.
+ (phi_translate): Move placement of AGGREGATE_TYPE_P check.
+ Allow COMPONENT_REF too.
+ (valid_in_set): Allow COMPONENT_REF.
+ Check ANTIC_SAFE_LOADS too.
+ (compute_antic_aux): Print out ANTIC_SAFE_LOADS.
+ (compute_rvuse_and_antic_safe): Add ANTIC_SAFE computation, and
+ rename.
+ (can_PRE_operation): Add COMPONENT_REF.
+ (create_component_ref_by_pieces): New function.
+ (create_expression_by_pieces): Use create_component_ref_by_pieces.
+ (insert_aux): Move AGGREGATE_TYPE_P check here.
+ (compute_avail): Set bb local stmt uids.
+ (pass_pre): Use TODO_update_ssa_only_virtuals.
+
+2006-02-06 Ben Elliston <bje@au.ibm.com>
+
+ * configure.ac: Unconditionally disable decimal float by default.
+ * configure: Regenerate.
+
+2006-02-06 Ben Elliston <bje@au.ibm.com>
+
+ * read-rtl.c (read_name): Terminate reading on EOF.
+
+2006-02-06 Ben Elliston <bje@au.ibm.com>
* dfp.c (decimal_real_arithmetic): Change second argument type
from int to enum tree_code. Do not always return true, but now
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