A recent patch increased GCC's memory consumption!
gcctest@suse.de
gcctest@suse.de
Wed Jun 1 03:36: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 6696k to 6704k, overall 0.12%
Overall memory needed: 24808k -> 24820k
Peak memory use before GGC: 9645k -> 9653k
Peak memory use after GGC: 8957k -> 8965k
Maximum of released memory in single GGC run: 2790k
Garbage: 42232k -> 42237k
Leak: 6696k -> 6704k
Overhead: 5844k -> 5845k
GGC runs: 329
comparing combine.c compilation at -O1 level:
Amount of memory still referenced at the end of compilation increased from 7077k to 7085k, overall 0.11%
Overall memory needed: 27596k -> 27608k
Peak memory use before GGC: 9152k -> 9161k
Peak memory use after GGC: 8712k -> 8720k
Maximum of released memory in single GGC run: 2203k -> 2204k
Garbage: 62906k -> 62923k
Leak: 7077k -> 7085k
Overhead: 7555k -> 7557k
GGC runs: 522
comparing combine.c compilation at -O2 level:
Amount of memory still referenced at the end of compilation increased from 7042k to 7050k, overall 0.12%
Overall memory needed: 24816k -> 24824k
Peak memory use before GGC: 18271k -> 18279k
Peak memory use after GGC: 18084k -> 18093k
Maximum of released memory in single GGC run: 2523k -> 2524k
Garbage: 88050k -> 88073k
Leak: 7042k -> 7050k
Overhead: 10879k -> 10882k
GGC runs: 483
comparing combine.c compilation at -O3 level:
Overall memory needed: 25132k -> 25128k
Peak memory use before GGC: 18281k -> 18289k
Peak memory use after GGC: 18084k -> 18093k
Maximum of released memory in single GGC run: 3092k -> 3094k
Garbage: 117429k -> 117449k
Leak: 7131k -> 7123k
Overhead: 14425k -> 14428k
GGC runs: 537 -> 538
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 85588k -> 85596k
Peak memory use before GGC: 73387k -> 73395k
Peak memory use after GGC: 45356k -> 45365k
Maximum of released memory in single GGC run: 37613k
Garbage: 153503k -> 153491k
Leak: 11294k -> 11302k
Overhead: 19577k -> 19577k
GGC runs: 268
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 101496k -> 101136k
Peak memory use before GGC: 76431k -> 76439k
Peak memory use after GGC: 65586k -> 65594k
Maximum of released memory in single GGC run: 37093k
Garbage: 302929k -> 302936k
Leak: 11595k -> 11603k
Overhead: 36643k -> 36645k
GGC runs: 382 -> 381
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 154092k -> 154104k
Peak memory use before GGC: 118398k -> 118406k
Peak memory use after GGC: 93017k -> 93025k
Maximum of released memory in single GGC run: 32950k
Garbage: 404099k -> 404106k
Leak: 11437k -> 11445k
Overhead: 49975k -> 49977k
GGC runs: 306 -> 305
comparing insn-attrtab.c compilation at -O3 level:
Overall memory needed: 154128k -> 154120k
Peak memory use before GGC: 118400k -> 118408k
Peak memory use after GGC: 93019k -> 93027k
Maximum of released memory in single GGC run: 32950k
Garbage: 404887k -> 404894k
Leak: 11458k -> 11466k
Overhead: 50097k -> 50099k
GGC runs: 312 -> 311
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 127320k -> 127328k
Peak memory use before GGC: 103072k -> 103080k
Peak memory use after GGC: 102049k -> 102057k
Maximum of released memory in single GGC run: 21522k
Garbage: 247319k -> 247319k
Leak: 53790k -> 53798k
Overhead: 42786k -> 42786k
GGC runs: 346 -> 347
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 121428k -> 121436k
Peak memory use before GGC: 112514k -> 112522k
Peak memory use after GGC: 100692k -> 100700k
Maximum of released memory in single GGC run: 20025k
Garbage: 659427k -> 659498k
Leak: 58901k -> 58903k
Overhead: 83365k -> 83377k
GGC runs: 518 -> 517
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 121408k -> 121412k
Peak memory use before GGC: 112515k -> 112523k
Peak memory use after GGC: 100692k -> 100700k
Maximum of released memory in single GGC run: 20025k
Garbage: 764619k -> 764839k
Leak: 59598k -> 59599k
Overhead: 102503k -> 102537k
GGC runs: 609 -> 608
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 124356k -> 124364k
Peak memory use before GGC: 115257k -> 115265k
Peak memory use after GGC: 102518k -> 102526k
Maximum of released memory in single GGC run: 21385k
Garbage: 821140k -> 821336k
Leak: 60863k -> 60847k
Overhead: 108816k -> 108837k
GGC runs: 609
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2005-05-31 23:32:40.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2005-06-01 02:31:50.000000000 +0000
@@ -1,3 +1,89 @@
+2005-06-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/i386/cygming.h (NO_PROFILE_COUNTERS): Define.
+
+2005-05-31 Geoffrey Keating <geoffk@geoffk.org>
+
+ * config/rs6000/rs6000.md (sync_boolcshort_internal): New.
+ * config/rs6000/rs6000.c (rs6000_emit_sync): Shift count must
+ be complemented for big-endian. Mask for AND must be rotated,
+ not shifted. Handle short operands with NOT on the memory
+ operation.
+
+2005-05-30 Daniel Berlin <dberlin@dberlin.org>
+
+ * c-objc-common.c (c_tree_printer): Check flag before hashtable.
+ Use DECL_DEBUG_EXPR and SET_DECL_DEBUG_EXPR.
+ * dwarf2out.c (dwarf2out_var_location): Ditto.
+ * toplev.c (default_tree_printer): Ditto.
+ * tree-outof-ssa.c (create_temp): Ditto.
+ * tree-sra.c (instantiate_element): Ditto.
+ * var-tracking.c (track_expr_p): Ditto.
+ * tree.c (struct tree_map): New structure.
+ (debug_expr_for_decl): New.
+ (tree_map_eq): New function.
+ (tree_map_hash): Ditto.
+ (tree_map_marked_p): Ditto.
+ (print_debug_expr_statistics): Ditto.
+ (decl_debug_expr_lookup): Ditto.
+ (decl_debug_expr_insert): Ditto.
+ (dump_tree_statistics): Dump debug_expr hashtable stats.
+ * tree.h (DECL_DEBUG_EXPR): Change
+ (SET_DECL_DEBUG_EXPR): Add.
+
+2005-06-01 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.ac: Add --enable-secureplt.
+ (HAVE_AS_REL16): Test for R_PPC_REL16 relocs.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * config.gcc (powerpc64-*-linux*, powerpc-*-linux*): Add
+ rs6000/secureplt.h to tm_file when enable_secureplt.
+ * doc/invoke.texi (msecure-plt, mbss-plt): Document.
+ * doc/install.texi: Document --enable-targets and --enable-secureplt.
+ Correct xrefs to "Using the GNU Compiler Collection (GCC)".
+ * config/rs6000/secureplt.h: New file.
+ * config/rs6000/sysv4.h (TARGET_SECURE_PLT): Define.
+ (SUBTARGET_OVERRIDE_OPTIONS): Error if -msecure-plt given without
+ assembler support.
+ (CC1_SECURE_PLT_DEFAULT_SPEC): Define.
+ (CC1_SPEC): Delete duplicate mno-sdata. Invoke cc1_secure_plt_default.
+ (SUBTARGET_EXTRA_SPECS): Add cc1_secure_plt_default.
+ * config/rs6000/sysv4.opt (msecure-plt, bss-plt): Add options.
+ * config/rs6000/rs6000.h (TARGET_SECURE_PLT): Define.
+ * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Handle
+ TARGET_SECURE_PLT got register load sequence.
+ (rs6000_emit_prologue): Call rs6000_emit_load_toc_table when
+ TARGET_SECURE_PLT.
+ (rs6000_elf_declare_function_name): Don't emit toc address offset
+ word when TARGET_SECURE_PLT.
+ * config/rs6000/rs6000.md (elf_high, elf_low): Move past load_toc_*.
+ (load_toc_v4_PIC_1) Enable for TARGET_SECURE_PLT.
+ (load_toc_v4_PIC_3b, load_toc_v4_PIC_3c): New insns.
+ (call, call_value): Mark pic_offset_table_rtx used for sysv pic and
+ TARGET_SECURE_PLT.
+ (call_nonlocal_sysv, call_value_nonlocal_sysv, sibcall_nonlocal_sysv,
+ sibcall_value_nonlocal_sysv): Add 32768 offset when TARGET_SECURE_PLT
+ and -fPIC.
+ * config/rs6000/tramp.asm (trampoline_initial): Use "bcl 20,31".
+ (__trampoline_setup): Likewise. Init r30 before plt call.
+
+2005-05-31 DJ Delorie <dj@redhat.com>
+
+ * expr.c (convert_move): When a partial_int requires multiple
+ conversion steps, make sure successive steps convert the
+ intermediate value, not the original value.
+
+ * expmed.c (expand_mult): Convert partial_int multiplies to
+ shift/add combinations too.
+
+ * genmodes.c (mode_data): Add wider_2x.
+ (calc_wider_mode): Calculate twice-wider mode too.
+ (emit_mode_wider): Emit twice-wider mode too.
+ * machmode.h (mode_2xwider, GET_MODE_2XWIDER_MODE): New.
+ * expr.c (expand_expr_real_1): Use it for expanding
+ multiplies.
+
2005-05-31 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/21817
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