This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch increased GCC's memory consumption!
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Tue, 06 Dec 2005 13:32:40 +0000
- Subject: A recent patch increased GCC's memory consumption!
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: 24993k
Peak memory use before GGC: 9600k
Peak memory use after GGC: 8947k
Maximum of released memory in single GGC run: 2736k
Garbage: 40120k
Leak: 6665k
Overhead: 5745k
GGC runs: 317
comparing combine.c compilation at -O1 level:
Overall memory needed: 26824k
Peak memory use before GGC: 17368k
Peak memory use after GGC: 17185k
Maximum of released memory in single GGC run: 2372k -> 2373k
Garbage: 60920k -> 60902k
Leak: 6848k
Overhead: 7552k -> 7555k
GGC runs: 389
comparing combine.c compilation at -O2 level:
Overall memory needed: 26824k
Peak memory use before GGC: 17370k
Peak memory use after GGC: 17185k
Maximum of released memory in single GGC run: 2454k -> 2453k
Garbage: 77579k -> 77567k
Leak: 6933k
Overhead: 9987k -> 9994k
GGC runs: 457
comparing combine.c compilation at -O3 level:
Amount of memory still referenced at the end of compilation increased from 6999k to 7011k, overall 0.17%
Overall memory needed: 26824k
Peak memory use before GGC: 18371k -> 18370k
Peak memory use after GGC: 18001k -> 18000k
Maximum of released memory in single GGC run: 3521k
Garbage: 108296k -> 108292k
Leak: 6999k -> 7011k
Overhead: 13564k -> 13571k
GGC runs: 510
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 80920k
Peak memory use before GGC: 69474k
Peak memory use after GGC: 45012k
Maximum of released memory in single GGC run: 36247k
Garbage: 146698k
Leak: 9817k
Overhead: 19752k
GGC runs: 252
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 112088k -> 112084k
Peak memory use before GGC: 94462k -> 94461k
Peak memory use after GGC: 83561k -> 83560k
Maximum of released memory in single GGC run: 32588k -> 32589k
Garbage: 296191k -> 296189k
Leak: 10035k
Overhead: 36706k -> 36707k
GGC runs: 247
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 125656k
Peak memory use before GGC: 111816k
Peak memory use after GGC: 83473k -> 83472k
Maximum of released memory in single GGC run: 32178k
Garbage: 381053k -> 381050k
Leak: 10136k
Overhead: 48220k -> 48221k
GGC runs: 275
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 125708k
Peak memory use before GGC: 111846k
Peak memory use after GGC: 83502k
Maximum of released memory in single GGC run: 32503k -> 32502k
Garbage: 381635k -> 381633k
Leak: 10141k
Overhead: 48372k -> 48374k
GGC runs: 277
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 118388k
Peak memory use before GGC: 95144k
Peak memory use after GGC: 94196k
Maximum of released memory in single GGC run: 20460k
Garbage: 223590k
Leak: 49156k
Overhead: 36686k
GGC runs: 370
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 105524k
Peak memory use before GGC: 95273k
Peak memory use after GGC: 93199k
Maximum of released memory in single GGC run: 20343k
Garbage: 568718k -> 567494k
Leak: 54980k
Overhead: 67215k -> 67976k
GGC runs: 521 -> 522
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 106120k -> 106496k
Peak memory use before GGC: 95273k
Peak memory use after GGC: 93199k
Maximum of released memory in single GGC run: 20342k
Garbage: 650846k -> 649381k
Leak: 55762k -> 55778k
Overhead: 78145k -> 79004k
GGC runs: 584
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 109248k -> 109444k
Peak memory use before GGC: 96741k
Peak memory use after GGC: 94276k
Maximum of released memory in single GGC run: 20838k
Garbage: 709793k -> 708176k
Leak: 57022k -> 57022k
Overhead: 83016k -> 83981k
GGC runs: 593
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-12-06 02:01:26.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-12-06 12:21:36.000000000 +0000
@@ -1,3 +1,81 @@
+2005-12-06 Andreas Schwab <schwab@suse.de>
+
+ * opts.c (decode_options): Fix typo in message.
+
+2005-12-06 Alan Modra <amodra@bigpond.net.au>
+
+ PR other/13873
+ * longlong.h: Merge PPC tests from upstream.
+
+2005-12-06 Richard Guenther <rguenther@suse.de>
+
+ * fold-const.c (fold_convert): Do not build and fold
+ CONVERT_EXPR, but always use NOP_EXPR.
+
+2005-12-06 Jan Beulich <jbeulich@novell.com>
+
+ * config/i386/i386.c (builtin_description): Use MASK_SSE2 for
+ __builtin_ia32_paddq and __builtin_ia32_subq.
+ (ix86_init_mmx_sse_builtins): Use MASK_SSE|MASK_3DNOW_A for
+ __builtin_ia32_pshufw.
+ * config/i386/i386.md (mmx_adddi3, mmx_subdi3): Depend on TARGET_SSE2.
+
+2005-12-05 James E Wilson <wilson@specifix.com>
+
+ PR target/24934
+ * opts.c (decode_options): Turn off partitioning if flag_unwind_tables
+ is set.
+
+2005-12-05 Daniel Berlin <dberlin@dberlin.org>
+
+ * print-tree.c (print_node): Ditto.
+ * tree-dfa.c (add_referenced_var): Tag's don't have DECL_INITIAL.
+ * tree-dump.c (dequeue_and_dump): Check for decl_common structure
+ before accessing DECL_ARTIFICIAL.
+ Handle new tag tree codes.
+ * tree-flow-inline.h (clear_call_clobbered): Update for tag
+ changes.
+ (unmodifiable_var_p): Ditto.
+ * tree-flow.h (mem_tag_kind): Remove.
+ (struct var_ann_d): Remove mem_tag_kind member.
+ * tree-gimple.c (is_gimple_reg): Tags are not gimple registers.
+ * tree-pretty-print.c (dump_generic_node): Handle memory tags.
+ * tree-ssa-alias.c (init_alias_info): Update for memory tag changes.
+ (group_aliases): Ditto.
+ (setup_pointers_and_addressables): Ditto.
+ (is_escape_site): Ditto.
+ (may_alias_p): Ditto.
+ (create_tag_raw): New function.
+ (create_memory_tag): Use it.
+ (dump_alias_info): Update for tags.
+ (may_be_aliased): Ditto.
+ (add_type_alias): Ditto.
+ (new_type_alias): Ditto.
+ (create_sft): Ditto.
+ (create_structure_vars): Ditto.
+ * tree-ssa-ccp.c (get_default_value): Ditto.
+ * tree-ssa-operands.c (get_expr_operands): Ditto.
+ (add_stmt_operand): Ditto.
+ (add_call_clobber_ops): Remove duplicated condition.
+ * tree-ssa.c (verify_flow_insensitive_alias_info): Update for
+ tags.
+ * tree-tailcall.c (suitable_for_tail_opt_p): Ditto.
+ * tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.
+ * tree.c (init_ttree): Update structures for new tree codes.
+ (tree_code_size): Update sizes for new tree codes.
+ (make_node_stat): Don't try to set common things on minimal
+ structures.
+ (tree_node_structure): Update for tags.
+ (is_global_var): Ditto.
+ * tree.def: Add new tree codes.
+ * tree.h (MTAG_P): New macro.
+ (TREE_MEMORY_TAG_CHECK): Ditto.
+ (SSA_VAR_P): Update for tags.
+ (struct tree_memory_tag): New structure.
+ (MTAG_GLOBAL): New macro.
+ (union tree_node): Add memory tag member.
+ * treestruct.def (TS_MEMORY_TAG): New.
+
2005-12-05 Dale Johannesen <dalej@apple.com>
* config/i386/xmmintrin.h (_MM_TRANSPOSE4_PS): Fix to match
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp 2005-12-03 01:31:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog 2005-12-06 12:21:22.000000000 +0000
@@ -1,3 +1,8 @@
+2005-12-05 Daniel Berlin <dberlin@dberlin.org>
+
+ * ptree.c (cxx_print_decl): Update to check for decl_common
+ structure.
+
2005-12-02 Mark Mitchell <mark@codesourcery.com>
PR c++/24173
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.