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: Thu, 23 Nov 2006 17:19: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 empty function compilation at -O0 level:
Overall memory needed: 18255k -> 18251k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 422k
Leak: 2271k
Overhead: 446k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18271k -> 18267k
Peak memory use before GGC: 2260k
Peak memory use after GGC: 1967k
Maximum of released memory in single GGC run: 293k
Garbage: 424k
Leak: 2303k
Overhead: 450k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18359k -> 18351k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 427k
Leak: 2274k
Overhead: 446k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18367k -> 18363k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k
Leak: 2274k
Overhead: 447k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18367k -> 18363k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k
Leak: 2274k
Overhead: 447k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28443k -> 28439k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k
Leak: 6461k
Overhead: 4869k
GGC runs: 279
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 30535k -> 30531k
Peak memory use before GGC: 10859k
Peak memory use after GGC: 10489k
Maximum of released memory in single GGC run: 2415k
Garbage: 37429k
Leak: 9271k
Overhead: 5537k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory needed: 40287k -> 40283k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2275k -> 2274k
Garbage: 57485k -> 57480k
Leak: 6515k -> 6515k
Overhead: 6227k -> 6226k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 6613k to 6621k, overall 0.12%
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2876k -> 2866k
Garbage: 74892k -> 74882k
Leak: 6613k -> 6621k
Overhead: 8473k -> 8471k
GGC runs: 411
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4106k -> 4101k
Garbage: 112668k -> 112616k
Leak: 6689k -> 6688k
Overhead: 13030k -> 13022k
GGC runs: 462
Overall memory needed: 28443k -> 28439k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k
Leak: 6461k
Overhead: 4869k
GGC runs: 279
comparing combine.c compilation at -O1 level:
Overall memory needed: 40287k -> 40283k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2275k -> 2274k
Garbage: 57485k -> 57480k
Leak: 6515k -> 6515k
Overhead: 6227k -> 6226k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 6613k to 6621k, overall 0.12%
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2876k -> 2866k
Garbage: 74892k -> 74882k
Leak: 6613k -> 6621k
Overhead: 8473k -> 8471k
GGC runs: 411
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4106k -> 4101k
Garbage: 112668k -> 112616k
Leak: 6689k -> 6688k
Overhead: 13030k -> 13022k
GGC runs: 462
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 88246k
Peak memory use before GGC: 69793k
Peak memory use after GGC: 44203k
Maximum of released memory in single GGC run: 36964k
Garbage: 129066k
Leak: 9520k
Overhead: 17001k
GGC runs: 216
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 89426k
Peak memory use before GGC: 70942k
Peak memory use after GGC: 45459k
Maximum of released memory in single GGC run: 36964k
Garbage: 130494k
Leak: 10951k
Overhead: 17380k
GGC runs: 212
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114178k
Peak memory use before GGC: 90379k
Peak memory use after GGC: 83741k
Maximum of released memory in single GGC run: 31852k
Garbage: 277776k
Leak: 9362k
Overhead: 29792k
GGC runs: 221
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 129390k -> 129386k
Peak memory use before GGC: 92608k
Peak memory use after GGC: 84720k
Maximum of released memory in single GGC run: 30398k
Garbage: 317198k
Leak: 9364k
Overhead: 36371k
GGC runs: 244
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 134238k
Peak memory use before GGC: 92634k
Peak memory use after GGC: 84746k
Maximum of released memory in single GGC run: 30585k
Garbage: 318053k
Leak: 9367k
Overhead: 36606k
GGC runs: 248
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 120002k
Peak memory use before GGC: 93312k
Peak memory use after GGC: 92385k
Maximum of released memory in single GGC run: 20013k
Garbage: 207743k
Leak: 47730k
Overhead: 20983k
GGC runs: 409
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 132502k
Peak memory use before GGC: 105441k
Peak memory use after GGC: 104390k
Maximum of released memory in single GGC run: 19646k
Garbage: 214331k
Leak: 70689k
Overhead: 26600k
GGC runs: 380
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119138k
Peak memory use before GGC: 97923k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 446309k -> 446424k
Leak: 50116k -> 50112k
Overhead: 32836k -> 32783k
GGC runs: 559
comparing Gerald's testcase PR8361 compilation at -O2 level:
Amount of produced GGC garbage increased from 505250k to 505759k, overall 0.10%
Overall memory needed: 119162k
Peak memory use before GGC: 97924k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 505250k -> 505759k
Leak: 50800k -> 50796k
Overhead: 40016k -> 39996k
GGC runs: 613
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 118994k
Peak memory use before GGC: 97968k
Peak memory use after GGC: 96997k
Maximum of released memory in single GGC run: 18932k
Garbage: 526304k -> 526809k
Leak: 50345k -> 50369k
Overhead: 40921k -> 40921k
GGC runs: 628 -> 627
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137962k
Peak memory use before GGC: 81913k
Peak memory use after GGC: 58792k
Maximum of released memory in single GGC run: 45493k
Garbage: 147245k
Leak: 7541k
Overhead: 25304k
GGC runs: 82
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138138k
Peak memory use before GGC: 82546k
Peak memory use after GGC: 59426k
Maximum of released memory in single GGC run: 45558k
Garbage: 147415k
Leak: 9249k
Overhead: 25769k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 424266k -> 424334k
Peak memory use before GGC: 205233k
Peak memory use after GGC: 201009k
Maximum of released memory in single GGC run: 101903k
Garbage: 272136k
Leak: 47606k
Overhead: 31282k
GGC runs: 101
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 352386k -> 352130k
Peak memory use before GGC: 206006k
Peak memory use after GGC: 201782k
Maximum of released memory in single GGC run: 108808k
Garbage: 352361k
Leak: 48189k
Overhead: 47027k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 781310k -> 781218k
Peak memory use before GGC: 314929k
Peak memory use after GGC: 293272k
Maximum of released memory in single GGC run: 165197k
Garbage: 494379k
Leak: 65522k
Overhead: 59885k
GGC runs: 98
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-11-22 23:02:06.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-11-23 15:35:06.000000000 +0000
@@ -1,3 +1,62 @@
+2006-11-23 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * var-tracking.c (emit_note_insn_var_location): Take care not to
+ cause verify_flow_info failures.
+
+2006-11-22 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-ssa-structalias.c: Remove edge weights in favor of just
+ processing them as complex constraints.
+ (struct constraint_graph): Remove weighted succs and preds. Rename
+ nonweighted succs and preds.
+ (constraint_edge): Removed.
+ (constraint_edge_t): Ditto.
+ (constraint_edge_pool): Ditto.
+ (new_constraint_edge): Ditto.
+ (constraint_edge_equal): Ditto.
+ (constraint_edge_less): Ditto.
+ (constraint_edge_vec_find): Ditto.
+ (erase_self_graph_edge): Ditto.
+ (add_graph_edge): Removed.
+ (get_graph_weights): Ditto.
+ (allocate_graph_weights): Ditto. (
+ (valid_weighted_graph_edge): Ditto
+ (bitmap_other_than_zero_bit_set): Ditto.
+ (int_add_graph_edge): Renamed to add_graph_edge.
+ (clear_edges_for_node): Remove support for weighted edges.
+ (merge_graph_nodes): Ditto.
+ (valid_graph_edge): Ditto.
+ (build_constraint_graph): Ditto.
+ (scc_visit): Ditto.
+ (collapse_nodes): Ditto.
+ (process_unification_queue): Ditto.
+ (topo_visit): Ditto.
+ (do_ds_constraint): Ditto.
+ (perform_var_subsitution): Ditto.
+ (solve_graph): Ditto.
+ (init_alias_vars): Ditto.
+ (delete_points_to_sets): Ditto.
+ (do_complex_constraint): Support offsetted copies here.
+
+2006-11-23 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/spu/spu_intrinsics.h (SPU_RdEventStatMask): Rename to
+ SPU_RdEventMask.
+ * config/spu/spu_mfcio.h (spu_read_event_mask): Update.
+
+ * config/spu/spu_mfcio.h (struct mfc_list_element): Change width
+ of size bitfield.
+
+2006-11-23 Ben Elliston <bje@au.ibm.com>
+
+ * config/spu/spu-elf.h (LIB_SPEC): Do not link with -lc_p.
+
+2006-11-23 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR tree-optimization/29921
+ * fold-const.c (operand_equal_p): Without HONOR_SIGNED_ZEROS, consider
+ signed and unsigned zero equal.
+
2006-11-22 Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/rs6000.c (get_store_dest): New.
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.