A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Tue Jul 24 03:31: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: 8331k -> 8332k
Peak memory use before GGC: 3386k
Peak memory use after GGC: 3033k
Maximum of released memory in single GGC run: 353k
Garbage: 525k
Leak: 3786k
Overhead: 913k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 8347k -> 8348k
Peak memory use before GGC: 3413k
Peak memory use after GGC: 3061k
Maximum of released memory in single GGC run: 352k
Garbage: 527k
Leak: 3819k
Overhead: 917k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 8387k -> 8388k
Peak memory use before GGC: 3386k
Peak memory use after GGC: 3033k
Maximum of released memory in single GGC run: 353k
Garbage: 530k
Leak: 3789k
Overhead: 913k
GGC runs: 3
comparing empty function compilation at -O2 level:
Overall memory needed: 8387k -> 8388k
Peak memory use before GGC: 3386k
Peak memory use after GGC: 3033k
Maximum of released memory in single GGC run: 353k
Garbage: 534k
Leak: 3789k
Overhead: 914k
GGC runs: 3
comparing empty function compilation at -O3 level:
Overall memory needed: 8387k -> 8388k
Peak memory use before GGC: 3386k
Peak memory use after GGC: 3033k
Maximum of released memory in single GGC run: 353k
Garbage: 534k
Leak: 3789k
Overhead: 914k
GGC runs: 3
comparing combine.c compilation at -O0 level:
Overall memory needed: 23827k -> 23824k
Peak memory use before GGC: 10324k
Peak memory use after GGC: 9555k
Maximum of released memory in single GGC run: 1905k
Garbage: 39044k
Leak: 8843k
Overhead: 5685k
GGC runs: 254
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 25699k -> 25700k
Peak memory use before GGC: 11987k
Peak memory use after GGC: 11347k
Maximum of released memory in single GGC run: 1516k
Garbage: 39429k
Leak: 11728k
Overhead: 6391k
GGC runs: 249
comparing combine.c compilation at -O1 level:
Overall memory needed: 37563k -> 37564k
Peak memory use before GGC: 18982k
Peak memory use after GGC: 18791k
Maximum of released memory in single GGC run: 1370k
Garbage: 53255k -> 53257k
Leak: 8899k
Overhead: 6745k -> 6745k
GGC runs: 326
comparing combine.c compilation at -O2 level:
Overall memory needed: 39595k -> 39596k
Peak memory use before GGC: 19036k
Peak memory use after GGC: 18847k
Maximum of released memory in single GGC run: 1403k
Garbage: 71792k -> 71794k
Leak: 9012k -> 9019k
Overhead: 8878k -> 8878k
GGC runs: 388
comparing combine.c compilation at -O3 level:
Overall memory needed: 42207k -> 42236k
Peak memory use before GGC: 19282k
Peak memory use after GGC: 18974k
Maximum of released memory in single GGC run: 2104k
Garbage: 93364k -> 93365k
Leak: 9130k
Overhead: 11541k -> 11541k
GGC runs: 417
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 143147k -> 143148k
Peak memory use before GGC: 60813k
Peak memory use after GGC: 34063k
Maximum of released memory in single GGC run: 34384k
Garbage: 132285k
Leak: 11333k
Overhead: 14975k
GGC runs: 198
comparing insn-attrtab.c compilation at -O0 -g level:
Amount of memory still referenced at the end of compilation increased from 13042k to 13058k, overall 0.12%
Overall memory needed: 144411k -> 144412k
Peak memory use before GGC: 61975k
Peak memory use after GGC: 35224k
Maximum of released memory in single GGC run: 34385k
Garbage: 132514k -> 132498k
Leak: 13042k -> 13058k
Overhead: 15372k -> 15372k
GGC runs: 201
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 154567k -> 154564k
Peak memory use before GGC: 59311k
Peak memory use after GGC: 55086k
Maximum of released memory in single GGC run: 23586k
Garbage: 217483k -> 217478k
Leak: 11464k
Overhead: 25168k -> 25167k
GGC runs: 229
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 193607k -> 193596k
Peak memory use before GGC: 59194k
Peak memory use after GGC: 55147k
Maximum of released memory in single GGC run: 21338k
Garbage: 253146k -> 253142k
Leak: 11458k
Overhead: 30631k -> 30630k
GGC runs: 254
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 199211k -> 199208k
Peak memory use before GGC: 71750k
Peak memory use after GGC: 65982k
Maximum of released memory in single GGC run: 22951k
Garbage: 282510k -> 282505k
Leak: 11467k
Overhead: 32427k -> 32426k
GGC runs: 256
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 156824k -> 156808k
Peak memory use before GGC: 91617k
Peak memory use after GGC: 90699k
Maximum of released memory in single GGC run: 18002k
Garbage: 210811k
Leak: 55672k
Overhead: 26877k
GGC runs: 397
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 177808k
Peak memory use before GGC: 104507k
Peak memory use after GGC: 103472k
Maximum of released memory in single GGC run: 18639k
Garbage: 216668k
Leak: 79100k
Overhead: 32845k
GGC runs: 373
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 153450k -> 153447k
Peak memory use before GGC: 103601k
Peak memory use after GGC: 102502k
Maximum of released memory in single GGC run: 17399k
Garbage: 332875k -> 332784k
Leak: 55781k
Overhead: 33933k -> 33915k
GGC runs: 500 -> 499
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 164270k -> 164267k
Peak memory use before GGC: 104180k
Peak memory use after GGC: 103147k
Maximum of released memory in single GGC run: 17399k
Garbage: 389351k -> 389273k
Leak: 56469k -> 56468k
Overhead: 40192k -> 40178k
GGC runs: 557 -> 558
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 168950k -> 168947k
Peak memory use before GGC: 106514k
Peak memory use after GGC: 105432k
Maximum of released memory in single GGC run: 17828k
Garbage: 432785k -> 432708k
Leak: 57195k
Overhead: 43795k -> 43784k
GGC runs: 584 -> 583
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 387668k -> 387669k
Peak memory use before GGC: 103466k
Peak memory use after GGC: 59120k
Maximum of released memory in single GGC run: 50582k
Garbage: 179673k
Leak: 8998k
Overhead: 31652k
GGC runs: 65
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 388488k -> 388489k
Peak memory use before GGC: 104113k
Peak memory use after GGC: 59766k
Maximum of released memory in single GGC run: 50583k
Garbage: 179826k
Leak: 10766k
Overhead: 32147k
GGC runs: 72
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 306647k -> 306644k
Peak memory use before GGC: 84313k
Peak memory use after GGC: 75965k
Maximum of released memory in single GGC run: 39284k
Garbage: 232739k
Leak: 22617k
Overhead: 32720k
GGC runs: 71
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 314787k -> 314712k
Peak memory use before GGC: 80951k
Peak memory use after GGC: 75965k
Maximum of released memory in single GGC run: 33017k
Garbage: 242836k
Leak: 22698k
Overhead: 34952k
GGC runs: 85
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 1031759k -> 1031836k
Peak memory use before GGC: 184705k
Peak memory use after GGC: 172221k
Maximum of released memory in single GGC run: 80994k
Garbage: 349829k
Leak: 48697k
Overhead: 47427k
GGC runs: 67
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2007-07-21 22:27:01.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2007-07-24 01:23:54.000000000 +0000
@@ -1,3 +1,68 @@
+2007-07-23 Jan Hubicka <jH@suse.cz>
+
+ * i386.c (ix86_secondary_memory_needed): Break out to...
+ (inline_secondary_memory_needed): ... here.
+ (ix86_memory_move_cost): Break out to ...
+ (inline_memory_move_cost): ... here; add support for IN value of 2 for
+ maximum of input and output; fix handling of Q_REGS on 64bit.
+ (ix86_secondary_memory_needed): Microoptimize.
+
+2007-07-23 Sebastian Pop <sebpop@gmail.com>
+
+ * tree-data-ref.c (find_vertex_for_stmt, create_rdg_edge_for_ddr,
+ create_rdg_edges_for_scalar, create_rdg_edges, create_rdg_vertices,
+ stmts_from_loop, known_dependences_p, build_rdg): New.
+ * tree-data-ref.h: Depends on graphds.h.
+ (rdg_vertex, RDGV_STMT, rdg_dep_type, rdg_edge, RDGE_TYPE): New.
+ (build_rdg): Declared.
+ * Makefile.in (TREE_DATA_REF_H): Depends on graphds.h.
+
+2007-07-23 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-ssa-propagate.c (valid_gimple_expression_p): Match up with
+ ccp_min_invariant.
+
+2007-07-23 Peter Bergner <bergner@vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/PR28690
+ * optabs.c (expand_binop): (emit_cmp_and_jump_insns): Allow EQ compares.
+ * rtlanal.c (commutative_operand_precedence): Prefer both REG_POINTER
+ and MEM_POINTER operands over REG and MEM operands.
+ (swap_commutative_operands_p): Change return value to bool.
+ * rtl.h: Update the corresponding prototype.
+ * tree-ssa-address.c (gen_addr_rtx): Use simplify_gen_binary
+ instead of gen_rtx_PLUS.
+ * simplify-rtx.c (simplify_plus_minus_op_data_cmp): Change return
+ value to bool. Change function arguments to rtx's and update code
+ to match.
+ (simplify_plus_minus): Update the simplify_plus_minus_op_data_cmp
+ calls to match the new declaration.
+ * simplify-rtx.c (simplify_associative_operation): Don't
+ reorder simplify_binary_operation arguments.
+
+2007-07-23 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/mips.c (override_options): Use mips_costs to derive
+ the default branch cost.
+ * config/mips/mips.h (BRANCH_COST): Use mips_branch_cost rather
+ than mips_costs.
+ * config/mips/mips.opt (mbranch-cost=): New option.
+ * doc/invoke.texi (-mbrach-cost): Document new MIPS option.
+
+2007-07-23 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/mips.h (GR_REG_CLASS_P, COP_REG_CLASS_P): Delete.
+ (SECONDARY_MEMORY_NEEDED): Delete commented-out definition.
+ * config/mips/mips.c (mips_register_move_cost): Use reg_class_subset_p
+ instead of GR_REG_CLASS_P and COP_REG_CLASS_P.
+
+2007-07-23 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/constraints.md (ks): New constraint.
+ * config/mips/mips.md (*add<mode>3_sp1, *add<mode>3_sp2): Fold into...
+ (*add<mode>3_mips16): ...here.
+
2007-07-21 Uros Bizjak <ubizjak@gmail.com>
* optabs.h (enum optab_index): Add new OTI_signbit.
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