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: Wed, 20 Dec 2006 14:54:38 +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 empty function compilation at -O0 level:
Overall memory needed: 18281k
Peak memory use before GGC: 2235k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 293k
Garbage: 423k
Leak: 2273k
Overhead: 446k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18297k
Peak memory use before GGC: 2263k
Peak memory use after GGC: 1970k
Maximum of released memory in single GGC run: 293k
Garbage: 425k
Leak: 2305k
Overhead: 450k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18381k
Peak memory use before GGC: 2235k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 293k
Garbage: 427k
Leak: 2275k
Overhead: 446k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18393k
Peak memory use before GGC: 2236k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 294k
Garbage: 430k
Leak: 2275k
Overhead: 447k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18393k
Peak memory use before GGC: 2236k
Peak memory use after GGC: 1942k
Maximum of released memory in single GGC run: 294k
Garbage: 430k
Leak: 2275k
Overhead: 447k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28445k -> 28441k
Peak memory use before GGC: 9288k
Peak memory use after GGC: 8804k
Maximum of released memory in single GGC run: 2642k
Garbage: 37525k
Leak: 6454k
Overhead: 4872k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 30525k
Peak memory use before GGC: 10835k
Peak memory use after GGC: 10464k
Maximum of released memory in single GGC run: 2320k
Garbage: 38104k
Leak: 9330k
Overhead: 5574k
GGC runs: 272
comparing combine.c compilation at -O1 level:
Overall memory needed: 29474k
Peak memory use before GGC: 16962k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2254k
Garbage: 55702k
Leak: 6481k
Overhead: 9959k
GGC runs: 358
comparing combine.c compilation at -O2 level:
Overall memory needed: 29474k
Peak memory use before GGC: 16967k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2363k
Garbage: 71797k
Leak: 6611k
Overhead: 11849k
GGC runs: 412
comparing combine.c compilation at -O3 level:
Overall memory needed: 29602k
Peak memory use before GGC: 18066k
Peak memory use after GGC: 17599k
Maximum of released memory in single GGC run: 3676k
Garbage: 106280k
Leak: 6684k
Overhead: 16905k
GGC runs: 460
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 89654k
Peak memory use before GGC: 71193k
Peak memory use after GGC: 44700k
Maximum of released memory in single GGC run: 37868k
Garbage: 132119k
Leak: 9518k
Overhead: 16954k
GGC runs: 211
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 90826k
Peak memory use before GGC: 72355k
Peak memory use after GGC: 45967k
Maximum of released memory in single GGC run: 37869k
Garbage: 133525k
Leak: 10981k
Overhead: 17349k
GGC runs: 209
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 93726k
Peak memory use before GGC: 71858k
Peak memory use after GGC: 67990k
Maximum of released memory in single GGC run: 31671k
Garbage: 229875k
Leak: 9343k
Overhead: 29520k
GGC runs: 220
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 123986k
Peak memory use before GGC: 79550k
Peak memory use after GGC: 73714k
Maximum of released memory in single GGC run: 30216k
Garbage: 282685k
Leak: 9345k
Overhead: 35777k
GGC runs: 243
comparing insn-attrtab.c compilation at -O3 level:
Overall memory allocated via mmap and sbrk increased from 123738k to 128814k, overall 4.10%
Overall memory needed: 123738k -> 128814k
Peak memory use before GGC: 79575k
Peak memory use after GGC: 73740k
Maximum of released memory in single GGC run: 30410k
Garbage: 283525k
Leak: 9350k
Overhead: 36009k
GGC runs: 247
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119066k
Peak memory use before GGC: 92332k
Peak memory use after GGC: 91417k
Maximum of released memory in single GGC run: 19250k
Garbage: 211915k
Leak: 48116k
Overhead: 21222k
GGC runs: 416
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 131642k
Peak memory use before GGC: 104689k
Peak memory use after GGC: 103652k
Maximum of released memory in single GGC run: 18932k
Garbage: 218494k
Leak: 71548k
Overhead: 27127k
GGC runs: 389
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119502k
Peak memory use before GGC: 96665k
Peak memory use after GGC: 94462k
Maximum of released memory in single GGC run: 17940k
Garbage: 442643k
Leak: 50182k
Overhead: 103830k
GGC runs: 562
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119554k
Peak memory use before GGC: 96692k
Peak memory use after GGC: 94489k
Maximum of released memory in single GGC run: 18081k
Garbage: 497476k
Leak: 51150k
Overhead: 58753k
GGC runs: 615
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 121138k
Peak memory use before GGC: 97648k
Peak memory use after GGC: 96144k
Maximum of released memory in single GGC run: 18476k
Garbage: 517975k
Leak: 51123k
Overhead: 58758k
GGC runs: 621
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137642k
Peak memory use before GGC: 81588k
Peak memory use after GGC: 58467k
Maximum of released memory in single GGC run: 45167k
Garbage: 148519k
Leak: 7542k
Overhead: 25329k
GGC runs: 82
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138014k
Peak memory use before GGC: 82234k
Peak memory use after GGC: 59113k
Maximum of released memory in single GGC run: 45232k
Garbage: 148730k
Leak: 9309k
Overhead: 25824k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 418558k -> 418466k
Peak memory use before GGC: 199519k
Peak memory use after GGC: 192216k
Maximum of released memory in single GGC run: 94104k
Garbage: 284119k
Leak: 29778k
Overhead: 31548k
GGC runs: 98
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 343378k -> 343286k
Peak memory use before GGC: 199512k
Peak memory use after GGC: 192209k
Maximum of released memory in single GGC run: 96120k
Garbage: 364357k
Leak: 30361k
Overhead: 47297k
GGC runs: 104
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 771818k -> 771946k
Peak memory use before GGC: 317621k
Peak memory use after GGC: 296096k
Maximum of released memory in single GGC run: 168283k
Garbage: 504436k
Leak: 45414k
Overhead: 60274k
GGC runs: 98
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-12-19 21:38:59.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-12-20 13:14:45.000000000 +0000
@@ -1,3 +1,37 @@
+2006-12-20 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c: Update overall comment; fix vertical spacing.
+ * ipa-inline.c (cgraph_decide_inlining): Remove now redundant check.
+
+2006-12-20 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.h (FOR_EACH_STATIC_VARIABLE, FOR_EACH_STATIC_INITIALIZER): New
+ macros.
+ (varpool_first_static_initializer, varpol_next_static_initializer): New
+ inline functions.
+ * ipa-reference.c (analyze_variable): Simplify.
+ (static_execute): Use FOR_EACH_STATIC_INITIALIZER.
+ * ipa-type-escape.c (type_escape_execute): Use FOR_EACH_STATIC_VARIABLE.
+
+2006-12-19 Andrew Pinski <pinskia@gmail.com>
+
+ PR tree-opt/30045
+ * tree-vrp.c (nonnull_arg_p): Treat the static decl as always
+ non null.
+
+2006-12-20 Ben Elliston <bje@au.ibm.com>
+
+ * doc/invoke.texi (Optimize Options): Typo fix.
+
+2006-12-19 Eric Christopher <echristo@apple.com>
+
+ * config/darwin.c (machopic_select_section): Rewrite.
+ (darwin_text_section): New.
+ (darwin_rodata_section): Ditto.
+ (darwin_mergeable_string_section): Ditto.
+ (darwin_mergeable_constant_section): Ditto.
+ * config/darwin-sections.def: Add SECTION_STRINGS for cstring_section.
+
2006-12-19 Steve Ellcey <sje@cup.hp.com>
* config/pa/pa64-hpux.h (ASM_OUTPUT_EXTERNAL): Add undef.
@@ -5,8 +39,8 @@
2006-12-19 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/29544
- * gcc/Makefile.in (STAGE1_CHECKING): Rename to...
- (STAGE1_CHECKING_CFLAGS): ... this.
+ * gcc/Makefile.in (STAGE1_CHECKING): Rename to...
+ (STAGE1_CHECKING_CFLAGS): ... this.
2006-12-18 Andrew Pinski <pinskia@gmail.com>
@@ -66,7 +100,7 @@
(init_ssa_operands): Initialize operand memory and free lists.
(fini_ssa_operands): Remove references to free_vuses and free_vdefs.
(ssa_operand_alloc): Use graduated size memory allocation.
- (APPEND_OP_AFTER, MOVE_HEAD_AFTER, MOVE_HEAD_TO_FREELIST,
+ (APPEND_OP_AFTER, MOVE_HEAD_AFTER, MOVE_HEAD_TO_FREELIST,
INITIALIZE_USE): Remove.
(alloc_vop): New. Allocate a virtual operand.
(alloc_vdef, alloc_vuse): Delete.
@@ -168,7 +202,7 @@
* c-opts.c (c_common_post_options): Enabled by -Wextra.
* c-common.c (empty_body_warning): Replace Wextra with Wempty-body.
* c-parser.c (c_parser_c99_block_statement): Likewise.
-
+
2006-12-15 Jakub Jelinek <jakub@redhat.com>
PR target/30185
@@ -215,8 +249,8 @@
Trevor Smigiel <trevor_smigiel@playstation.sony.com>
* spu.c (TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): Defined.
- (spu_init_builtins): Mark the SPU_MASK_FOR_LOAD builtin decl as read
- only.
+ (spu_init_builtins): Mark the SPU_MASK_FOR_LOAD builtin decl as read
+ only.
(spu_expand_builtin_1): Handle the SPU_MASK_FOR_LOAD builtin.
(spu_builtin_mask_for_load): New.
* spu-builtins.def (SPU_MASK_FOR_LOAD): Define new builtin.
@@ -474,7 +508,7 @@
2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/28624
- * tree-ssa-dom.c (eliminate_degenerate_phis): Use a temporary
+ * tree-ssa-dom.c (eliminate_degenerate_phis): Use a temporary
bitmap for EXECUTE_IF_SET_IN_BITMAP.
2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
@@ -535,9 +569,9 @@
remove redundant pass_partition_blocks declaration.
2006-12-12 Andrew Macleod <amacleod@redhat.com>
-
+
PR tree-optimization/30159
- * tree-ssa-coalesce.c (coalesce_ssa_name): Process single ssa_name
+ * tree-ssa-coalesce.c (coalesce_ssa_name): Process single ssa_name
functions in case a default_def coalesce is required.
2006-12-12 Jakub Jelinek <jakub@redhat.com>
@@ -577,9 +611,9 @@
2006-12-12 Olivier Hainque <hainque@adacore.com>
* config/vxlib.c: Extract tls related routines into ...
- * config/vxlib-tls.c: New file.
+ * config/vxlib-tls.c: New file.
* config/t-vxworks: Add vxlib-tls.c to LIB2FUNCS_EXTRA.
-
+
2006-12-12 Sa Liu <saliu@de.ibm.com>
Ben Elliston <bje@au.ibm.com>
@@ -1204,7 +1238,7 @@
2006-12-11 Ira Rosen <irar@il.ibm.com>
- * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Use
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Use
GIMPLE_STMT_OPERAND.
* tree-vect-transform.c (vect_permute_store_chain): Likewise.
(vect_setup_realignment): Likewise.
@@ -1326,7 +1360,7 @@
* tree-flow-inline.h (single_imm_use_p): New. Check for single use.
* tree-outof-ssa.c: Remove header files which aren't needed.
(SSANORM_*): Remove flags.
- (print_exprs_edge, coalesce_abnormal_edges, coalesce_phi_operands,
+ (print_exprs_edge, coalesce_abnormal_edges, coalesce_phi_operands,
coalesce_result_decls_and_copies, coalesce_asm_operands): Remove.
(coalesce_ssa_name): Move to tree-ssa-coalesce.c.
(assign_vars): Use Basevar instead of root_var structure.
@@ -1402,7 +1436,7 @@
tpa_dump): Moved to tree-ssa-coalesce.c and/or renamed there.
(dump_var_map): Use renamed fields.
* tree-ssa-live.h (struct _var_map): Modify fields.
- (partition_to_var, version_to_var, var_to_partition): Use renamed
+ (partition_to_var, version_to_var, var_to_partition): Use renamed
fields.
(basevar_index): New. Index of the base variable of a partition.
(num_basevars): New. Number of unique base variables in partition map.
@@ -1411,9 +1445,9 @@
(tpa_num_trees, tpa_tree, tpa_first_partition, tpa_next_partition,
tpa_find_tree, tpa_decompact, root_var_init, root_var_num,
root_var, root_var_first_partition, root_var_next_partition,
- root_var_dump, root_var_delete, root_var_remove_partition,
+ root_var_dump, root_var_delete, root_var_remove_partition,
root_var_find, root_var_compact, root_var_decompact): Remove.
- (struct partition_pair, struct coalesce_list_d): Moved to
+ (struct partition_pair, struct coalesce_list_d): Moved to
tree-ssa-coalesce.c
* tree-ssa-ter.c: Remove header files which aren't needed.
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.