A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Thu Jun 2 21:30:00 GMT 2005
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:
Amount of memory still referenced at the end of compilation increased from 6706k to 6732k, overall 0.38%
Overall memory needed: 24828k -> 25288k
Peak memory use before GGC: 9653k -> 9657k
Peak memory use after GGC: 8965k -> 8970k
Maximum of released memory in single GGC run: 2790k
Garbage: 42280k -> 42259k
Leak: 6706k -> 6732k
Overhead: 5890k -> 5889k
GGC runs: 329 -> 328
comparing combine.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 7088k to 7097k, overall 0.14%
Overall memory needed: 27616k -> 27624k
Peak memory use before GGC: 9161k -> 9165k
Peak memory use after GGC: 8720k -> 8724k
Maximum of released memory in single GGC run: 2204k
Garbage: 63153k -> 63135k
Leak: 7088k -> 7097k
Overhead: 7793k -> 7791k
GGC runs: 521
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 7076k to 7087k, overall 0.15%
Overall memory needed: 24816k -> 24824k
Peak memory use before GGC: 18274k -> 18282k
Peak memory use after GGC: 18093k -> 18101k
Maximum of released memory in single GGC run: 2524k
Garbage: 86280k -> 86238k
Leak: 7076k -> 7087k
Overhead: 10936k -> 10928k
GGC runs: 479 -> 478
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 7147k to 7174k, overall 0.37%
Overall memory needed: 25060k -> 25056k
Peak memory use before GGC: 18276k -> 18284k
Peak memory use after GGC: 18093k -> 18101k
Maximum of released memory in single GGC run: 3099k
Garbage: 114883k -> 114882k
Leak: 7147k -> 7174k
Overhead: 14474k -> 14471k
GGC runs: 527 -> 528
comparing insn-attrtab.c compilation at -O0 level:
Amount of memory still referenced at the end of compilation increased from 11303k to 11542k, overall 2.11%
Overall memory needed: 85596k -> 85580k
Peak memory use before GGC: 73395k -> 73379k
Peak memory use after GGC: 45365k
Maximum of released memory in single GGC run: 37613k -> 37597k
Garbage: 153738k -> 153195k
Leak: 11303k -> 11542k
Overhead: 19826k -> 19639k
GGC runs: 268
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 101156k
Peak memory use before GGC: 76439k
Peak memory use after GGC: 65594k
Maximum of released memory in single GGC run: 37093k -> 37076k
Garbage: 305059k -> 304775k
Leak: 11605k -> 11603k
Overhead: 38740k -> 38553k
GGC runs: 381
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 154668k -> 154652k
Peak memory use before GGC: 121110k
Peak memory use after GGC: 92200k
Maximum of released memory in single GGC run: 32950k
Garbage: 403219k -> 402929k
Leak: 11445k -> 11445k
Overhead: 51578k -> 51392k
GGC runs: 303
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 154684k
Peak memory use before GGC: 121110k
Peak memory use after GGC: 92202k
Maximum of released memory in single GGC run: 32950k
Garbage: 403986k -> 403699k
Leak: 11467k -> 11466k
Overhead: 51700k -> 51513k
GGC runs: 309
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 127328k -> 127332k
Peak memory use before GGC: 103080k -> 103083k
Peak memory use after GGC: 102057k -> 102060k
Maximum of released memory in single GGC run: 21522k -> 21524k
Garbage: 247550k -> 247510k
Leak: 53798k -> 53777k
Overhead: 43016k -> 42959k
GGC runs: 347 -> 346
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121432k -> 121444k
Peak memory use before GGC: 112522k -> 112525k
Peak memory use after GGC: 100700k -> 100703k
Maximum of released memory in single GGC run: 20025k -> 20026k
Garbage: 662821k -> 662526k
Leak: 58927k -> 58909k
Overhead: 86717k -> 86378k
GGC runs: 517
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 121424k -> 121428k
Peak memory use before GGC: 112523k -> 112526k
Peak memory use after GGC: 100700k -> 100703k
Maximum of released memory in single GGC run: 20025k -> 20027k
Garbage: 758463k -> 758068k
Leak: 59614k -> 59604k
Overhead: 104856k -> 104509k
GGC runs: 600
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 124364k -> 124368k
Peak memory use before GGC: 115265k -> 115268k
Peak memory use after GGC: 102526k -> 102529k
Maximum of released memory in single GGC run: 21385k -> 21386k
Garbage: 814674k -> 814285k
Leak: 60958k -> 60972k
Overhead: 111421k -> 111049k
GGC runs: 603 -> 602
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-06-02 17:30:02.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-06-02 20:26:56.000000000 +0000
@@ -1,3 +1,79 @@
+2005-06-02 Kazu Hirata <kazu@codesourcery.com>
+
+ * gimplify.c (gimplify_ctx): Change the type of case_labels to
+ VEC from VARRAY.
+ (gimplify_switch_expr, gimplify_case_label_expr): Adjust uses
+ of case_labels.
+
+2005-06-02 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * c-typeck.c (build_indirect_ref): Build INDIRECT_REF
+ with correct type.
+
+2005-06-02 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (s390_add_execute): Do not handle out-of-pool
+ execute templates.
+ (s390_dump_pool): Likewise.
+ (s390_mainpool_start, s390_mainpool_finish): Likewise.
+ (s390_chunkify_start): Likewise.
+ (s390_dump_execute): Remove.
+ (s390_reorg): Handle out-of-pool execute templates.
+
+2005-06-02 Adrian Straetling <straetling@de.ibm.com>
+
+ * optabs.c: (expand_bool_compare_and_swap): Emit barrier after
+ unconditional jump.
+
+2005-06-02 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_node): Maintain master clones.
+ (cgraph_remove_node): Likewise.
+ (availability_names): New static variable.
+ (dump_cgraph_node): Dump availability.
+ (dump_cgraph_varpool_node): Likewise.
+ (cgraph_is_master_clone, cgraph_master_clone,
+ cgraph_function_body_availability,
+ cgraph_variable_initializer_availability): New functions.
+ * cgraph.h (availability): New enum.
+ (struct cgraph_node): Add master_clone.
+ (cgraph_is_master_clone, cgraph_master_clone,
+ cgraph_function_body_availability,
+ cgraph_variable_initializer_availability): Declare.
+ * cgraphunit.c (cgraph_expand_function): Setcgraph_function_flags_ready.
+ (cgraph_remove_unreachable_nodes): Remove unreachable nodes.
+ * ipa-inline.c (cgraph_decide_inlining): Do not call
+ cgraph_remove_unreachable_nodes.
+
+ * cgraphunit.c (cgraph_function_and_variable_visibility): Fix typo in
+ previous patch.
+
+2005-06-02 Diego Novillo <dnovillo@redhat.com>
+
+ PR 21582
+ * tree-vrp.c (nonnull_arg_p): New.
+ (get_value_range): Call it.
+
+2005-06-02 Eric Christopher <echristo@redhat.com>
+
+ * config/mips/mips.h (processor_type): Remove PROCESSOR_DEFAULT,
+ add PROCESSOR_MAX.
+ (mips_rtx_cost_data): New datatype.
+ (MEMORY_MOVE_COST): Use data from structure.
+ (BRANCH_COST): Ditto.
+ (LOGICAL_OP_NON_SHORT_CIRCUIT): Define to zero.
+ * config/mips/mips.md (cpu): Rework for processor_type changes.
+ * config/mips/mips.c (mips_cost): New variable.
+ (DEFAULT_COSTS): Define.
+ (mips_rtx_cost_data): New.
+ (mips_rtx_costs): Use. Minor formatting changes. Use COSTS_N_INSNS
+ for NEG cost. Add support for FLOAT, UNSIGNED_FLOAT, FIX,
+ FLOAT_EXTEND, FLOAT_TRUNCATE, and SQRT.
+ (override_options): Set cost data.
+ (mips_register_move_cost): Formatting changes.
+ (bdesc_arrays): Use PROCESSOR_MAX.
+ (mips_init_builtins): Ditto.
+
2005-06-02 Diego Novillo <dnovillo@redhat.com>
PR 21765
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-06-02 09:59:38.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-06-02 20:26:57.000000000 +0000
@@ -1,5 +1,20 @@
2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
+ * method.c (synthesize_method): Add addtional arg to warning call.
+
+ PR c++/21280
+ * Make-lang.in (method.o): Add diagnostic.h
+ * decl.c (start_preparsed_function): Use decl's location for file
+ info.
+ * decl2.c (cp_finish_file): Set input_location before synthesizing
+ a function.
+ (mark_used): When deferring a synthesized function, save current
+ location. Do not set function's location when actually
+ synthesizing it.
+ * method.c: #include diagnostic.h.
+ (synthesize_method): Set the functions source location. Show
+ needed location if errors are emitted.
+
* decl.c (start_decl): Simplify specialization handling. Remove
unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
* mangle.c (discriminator_for_local_entity): Use VEC_index.
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