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: Sun, 31 Dec 2006 04:23:11 +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: 18321k -> 18325k
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: 18337k -> 18341k
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: 18425k -> 18433k
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: 18437k -> 18441k
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: 18437k -> 18441k
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: 28489k -> 28493k
Peak memory use before GGC: 9255k
Peak memory use after GGC: 8803k
Maximum of released memory in single GGC run: 2609k
Garbage: 37143k
Leak: 6470k
Overhead: 4774k
GGC runs: 280
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 30565k -> 30569k
Peak memory use before GGC: 10834k
Peak memory use after GGC: 10463k
Maximum of released memory in single GGC run: 2365k
Garbage: 37748k
Leak: 9330k
Overhead: 5475k
GGC runs: 270
comparing combine.c compilation at -O1 level:
Overall memory needed: 29474k
Peak memory use before GGC: 16963k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2219k
Garbage: 55489k
Leak: 6482k
Overhead: 9901k
GGC runs: 362
comparing combine.c compilation at -O2 level:
Overall memory needed: 29470k
Peak memory use before GGC: 16967k
Peak memory use after GGC: 16792k
Maximum of released memory in single GGC run: 2299k
Garbage: 71657k -> 71654k
Leak: 6613k -> 6604k
Overhead: 11885k -> 11884k
GGC runs: 413
comparing combine.c compilation at -O3 level:
Overall memory needed: 29602k
Peak memory use before GGC: 18061k
Peak memory use after GGC: 17592k
Maximum of released memory in single GGC run: 3658k
Garbage: 105651k -> 105644k
Leak: 6684k
Overhead: 16757k -> 16756k
GGC runs: 462
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 89138k
Peak memory use before GGC: 70681k
Peak memory use after GGC: 44699k
Maximum of released memory in single GGC run: 37356k
Garbage: 130715k
Leak: 9278k
Overhead: 16498k
GGC runs: 207
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 90314k
Peak memory use before GGC: 71842k
Peak memory use after GGC: 45966k
Maximum of released memory in single GGC run: 37356k
Garbage: 131602k
Leak: 11221k
Overhead: 16893k
GGC runs: 206
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 96718k -> 96722k
Peak memory use before GGC: 71858k
Peak memory use after GGC: 67990k
Maximum of released memory in single GGC run: 31412k
Garbage: 229157k
Leak: 9343k
Overhead: 29436k
GGC runs: 220
comparing insn-attrtab.c compilation at -O2 level:
Overall memory allocated via mmap and sbrk increased from 104354k to 109170k, overall 4.62%
Overall memory needed: 104354k -> 109170k
Peak memory use before GGC: 79550k
Peak memory use after GGC: 73715k
Maximum of released memory in single GGC run: 29700k
Garbage: 281017k -> 281011k
Leak: 9345k
Overhead: 35301k -> 35299k
GGC runs: 241
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 109182k
Peak memory use before GGC: 79576k
Peak memory use after GGC: 73740k
Maximum of released memory in single GGC run: 29893k
Garbage: 281846k -> 281841k
Leak: 9350k
Overhead: 35530k -> 35529k
GGC runs: 243
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 119066k -> 119038k
Peak memory use before GGC: 92333k
Peak memory use after GGC: 91417k
Maximum of released memory in single GGC run: 19249k
Garbage: 211566k
Leak: 48116k
Overhead: 21006k
GGC runs: 416
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 131638k
Peak memory use before GGC: 104683k
Peak memory use after GGC: 103645k
Maximum of released memory in single GGC run: 18933k
Garbage: 218155k
Leak: 71543k
Overhead: 26909k
GGC runs: 389
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 118462k
Peak memory use before GGC: 95302k
Peak memory use after GGC: 94350k
Maximum of released memory in single GGC run: 17923k
Garbage: 436278k
Leak: 50189k
Overhead: 100018k
GGC runs: 558
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 118546k
Peak memory use before GGC: 95330k
Peak memory use after GGC: 94378k
Maximum of released memory in single GGC run: 18030k
Garbage: 491651k -> 491586k
Leak: 51154k
Overhead: 58600k -> 58593k
GGC runs: 612
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 121126k
Peak memory use before GGC: 97891k
Peak memory use after GGC: 96012k
Maximum of released memory in single GGC run: 18431k
Garbage: 511738k -> 511700k
Leak: 51125k
Overhead: 58547k -> 58539k
GGC runs: 616
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137638k
Peak memory use before GGC: 81587k
Peak memory use after GGC: 58467k
Maximum of released memory in single GGC run: 44559k
Garbage: 147003k
Leak: 8054k
Overhead: 24963k
GGC runs: 80
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138014k
Peak memory use before GGC: 82233k
Peak memory use after GGC: 59113k
Maximum of released memory in single GGC run: 44208k
Garbage: 147214k
Leak: 9309k
Overhead: 25458k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 422990k -> 423082k
Peak memory use before GGC: 199539k
Peak memory use after GGC: 193352k
Maximum of released memory in single GGC run: 112477k
Garbage: 282488k
Leak: 29778k
Overhead: 32103k
GGC runs: 96
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 343130k -> 343222k
Peak memory use before GGC: 199532k
Peak memory use after GGC: 193345k
Maximum of released memory in single GGC run: 111908k
Garbage: 359548k -> 359548k
Leak: 30361k
Overhead: 47259k -> 47259k
GGC runs: 103
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 931622k -> 931402k
Peak memory use before GGC: 317673k
Peak memory use after GGC: 296148k
Maximum of released memory in single GGC run: 172457k
Garbage: 496462k -> 496461k
Leak: 45414k
Overhead: 59242k -> 59242k
GGC runs: 97
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-12-29 19:05:25.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-12-31 02:39:24.000000000 +0000
@@ -1,3 +1,55 @@
+2006-12-30 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-inline.c: Fix a comment typo.
+
+2006-12-30 Jan Hubicka <jh@suse.cz>
+
+ * ipa-pure-const.c (check_operand): SSA_NAME is safe.
+ * ipa-type-escape.c (scan_for_refs): Look into SSA_NAMEs.
+
+2006-12-30 Jan Hubicka <jh@suse.cz>
+
+ * tree.h (DECL_CALL_CLOBBERED): Remove.
+ (tree_decl_common): Remove call_clobbered flag.
+ * tree-flow.h (struct var_ann_d): Add call_clobbered flag.
+ * tree-ssa-alias.c (mark_non_addressable, reset_cc_flags): Update.
+ * tree-flow-inline.h (is_call_clobbered, mark_call_clobbered,
+ clear_call_clobbered): Update.
+ * tree-ssa.c (verify_call_clobbering): Update.
+
+2006-12-30 Jan Hubicka <jh@suse.cz>
+
+ * tree-ssa-alias.c (create_structure_vars): When in SSA, update operand
+ caches.
+ * tree-ssa-operands.c (build_ssa_operands): Recompute addresses_taken
+ bitmap.
+
+2006-12-30 Jan Hubicka <jh@suse.cz>
+ Vladimir Yanovsky <volodyan@gmail.com>
+
+ * emit-rt.c (emit_copy_of_insn_after): Fix bug causing exponential
+ amount of copies of INSN_NOTEs list.
+
+2006-12-29 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_exapnd_queue): Rename to...
+ (cgraph_new_nodes): ... this one.
+ (cgraph_state): New global variable.
+ (cgraph_add_new_function): Work in more cases.
+ * cgraph.h (cgraph_expand_queue): Rename to ...
+ (cgraph_new_nodes): ... this one.
+ (cgraph_state): New enum and static variable.
+ (cgraph_add_new_function): Update prototype.
+ (cgraph_process_new_functions): New.
+ * omp-low.c (expand_omp_parallel): Update.
+ * cgraphunit.c (initialize_inline_failed): Declare early.
+ (cgraph_process_new_functions): New function.
+ (cgraph_assemble_pending_functions): Use it.
+ (cgraph_expand_all_functions): Use it.
+ (cgraph_optimize): Use it; set cgraph_state.
+ * passes.c (execute_one_pass, execute_ipa_pass_list): Process new
+ functions
+
2006-12-29 Kazu Hirata <kazu@codesourcery.com>
* tree-cfg.c (last_stmt_ptr): Remove.
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.