This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Some aspect of GCC memory consumption increased by recent patch


Hi,
Comparing memory consumption on compilation of combine.i and generate-3.4.ii I got:


comparing combine.c compilation at -O0 level:
  Overall memory allocated via mmap and sbrk increased from 17776k to 17824k, overall 0.27%
    Overall memory needed: 17776k -> 17824k
    Peak memory use before GGC: 9294k -> 9295k
    Peak memory use after GGC: 8606k
    Maximum of released memory in single GGC run: 2870k
    Garbage: 42611k -> 42610k
    Leak: 6103k -> 6105k
    Overhead: 5586k -> 5587k
    GGC runs: 365 -> 364

comparing combine.c compilation at -O1 level:
    Overall memory needed: 18448k -> 18444k
    Peak memory use before GGC: 9638k -> 9632k
    Peak memory use after GGC: 8804k -> 8800k
    Maximum of released memory in single GGC run: 2034k -> 2031k
    Garbage: 72435k -> 72398k
    Leak: 6669k -> 6671k
    Overhead: 12198k -> 12200k
    GGC runs: 588

comparing combine.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 21848k to 22020k, overall 0.79%
    Overall memory needed: 21848k -> 22020k
    Peak memory use before GGC: 12769k -> 12771k
    Peak memory use after GGC: 12610k -> 12612k
    Maximum of released memory in single GGC run: 2578k -> 2521k
    Garbage: 87845k -> 87658k
    Leak: 6424k -> 6425k
    Overhead: 16685k -> 16686k
    GGC runs: 580 -> 579

comparing combine.c compilation at -O3 level:
  Ovarall memory allocated via mmap and sbrk decreased from 26304k to 22724k, overall -15.75%
    Overall memory needed: 26304k -> 22724k
    Peak memory use before GGC: 13097k -> 13051k
    Peak memory use after GGC: 12739k -> 12693k
    Maximum of released memory in single GGC run: 3447k -> 3360k
    Garbage: 116948k -> 115988k
    Leak: 6950k -> 6943k
    Overhead: 21813k -> 21815k
    GGC runs: 643 -> 644

comparing insn-attrtab.c compilation at -O0 level:
  Amount of memory still referenced at the end of compilation increased from 10618k to 10643k, overall 0.23%
    Overall memory needed: 132860k
    Peak memory use before GGC: 77100k
    Peak memory use after GGC: 45185k
    Maximum of released memory in single GGC run: 42129k
    Garbage: 159511k -> 159513k
    Leak: 10618k -> 10643k
    Overhead: 19798k -> 19805k
    GGC runs: 310

comparing insn-attrtab.c compilation at -O1 level:
  Amount of memory still referenced at the end of compilation increased from 11051k to 11076k, overall 0.23%
    Overall memory needed: 149952k -> 149696k
    Peak memory use before GGC: 97424k -> 97258k
    Peak memory use after GGC: 71693k -> 71527k
    Maximum of released memory in single GGC run: 41239k -> 41234k
    Garbage: 490292k -> 489822k
    Leak: 11051k -> 11076k
    Overhead: 85512k -> 85519k
    GGC runs: 467 -> 466

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 224524k -> 224472k
    Peak memory use before GGC: 112977k -> 112818k
    Peak memory use after GGC: 87246k -> 87087k
    Maximum of released memory in single GGC run: 35988k -> 35978k
    Garbage: 542877k -> 542406k
    Leak: 11207k -> 11209k
    Overhead: 95625k -> 95631k
    GGC runs: 389 -> 388

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 224660k -> 224460k
    Peak memory use before GGC: 112978k -> 112823k
    Peak memory use after GGC: 87246k -> 87092k
    Maximum of released memory in single GGC run: 35988k -> 35979k
    Garbage: 544017k -> 543520k
    Leak: 11247k -> 11255k
    Overhead: 96026k -> 96034k
    GGC runs: 396 -> 395

comparing Gerald's testcase PR8361 compilation at -O0 level:
  Overall memory allocated via mmap and sbrk increased from 114840k to 115372k, overall 0.46%
  Peak amount of GGC memory allocated before garbage collecting increased from 92007k to 92254k, overall 0.27%
  Amount of memory still referenced at the end of compilation increased from 59854k to 60277k, overall 0.71%
    Overall memory needed: 114840k -> 115372k
    Peak memory use before GGC: 92007k -> 92254k
    Peak memory use after GGC: 90474k -> 90048k
    Maximum of released memory in single GGC run: 20897k -> 20148k
    Garbage: 274940k -> 273435k
    Leak: 59854k -> 60277k
    Overhead: 35160k -> 35270k
    GGC runs: 556

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 126168k -> 125568k
    Peak memory use before GGC: 96400k -> 95711k
    Peak memory use after GGC: 89739k -> 88914k
    Maximum of released memory in single GGC run: 20070k -> 19544k
    Garbage: 645990k -> 630948k
    Leak: 62367k -> 62405k
    Overhead: 130425k -> 130471k
    GGC runs: 805 -> 801

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 127244k -> 126680k
    Peak memory use before GGC: 96400k -> 95711k
    Peak memory use after GGC: 89740k -> 88915k
    Maximum of released memory in single GGC run: 20070k -> 19544k
    Garbage: 707068k -> 692065k
    Leak: 62927k -> 62974k
    Overhead: 156492k -> 156532k
    GGC runs: 837

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 125612k -> 125040k
    Peak memory use before GGC: 92495k -> 92218k
    Peak memory use after GGC: 90674k -> 90398k
    Maximum of released memory in single GGC run: 20814k -> 20259k
    Garbage: 746726k -> 731516k
    Leak: 63334k -> 63374k
    Overhead: 167574k -> 167615k
    GGC runs: 827

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-09-18 02:14:13.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-09-18 14:37:33.000000000 +0000
@@ -1,3 +1,57 @@
+2004-09-18  Diego Novillo  <dnovillo@redhat.com>
+
+	* tree-ssa-alias.c (setup_pointers_and_addressables): Don't
+	remove TREE_ADDRESSABLE from RESULT_DECL.
+
+2004-09-18  Diego Novillo  <dnovillo@redhat.com>
+
+	* tree-ssa-alias.c (dump_alias_info): Ignore NULL SSA_NAMEs.
+
+2004-09-18  Jan Hubicka  <jh@suse.cz>
+
+	* tree-into-ssa.c (rewrite_ssa_into_ssa):  Expect ssa_name to return
+	NULL.
+	* tree-ssa-alias.c (init_alias_info): Likewise.
+	* tree-ssa.c (verify_flow_sensitive_alias_info): Likewise.
+	(verify_ssa): Likewise.
+	* tree-ssanames.c (make_ssa_name): Clear out ssa_names arrays.
+
+2004-09-18  Jan Hubicka  <jh@suse.cz>
+
+	* i386.c (legitimize_pic_address): Fix splitting of PLUS with
+	huge offset.
+
+2004-09-18  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+	* config/sh/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove.
+	* config/sh/sh.h (ASM_PREFERRED_EH_DATA_FORMAT): Use
+	DW_EH_PE_sdata* for data.
+	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
+
+2004-09-17  Geoffrey Keating  <geoffk@apple.com>
+
+	* tree-inline.c (copy_tree_r): Don't duplicate constants, they're
+	shared anyway.
+
+	PR pch/13361
+	* c-typeck.c (constructor_asmspec): Delete.
+	(struct initializer_stack): Delete field 'asmspec'.
+	(start_init): Delete saving of asmspec.
+	(finish_init): Don't update constructor_asmspec.
+	* dwarf2out.c (rtl_for_decl_location): Duplicate string from tree.
+	* stmt.c (expand_asm): Duplicate strings from tree.
+	(expand_asm_operands): Likewise.
+	* tree.c (tree_size): Update computation of size of STRING_CST.
+	(make_node): Don't make STRING_CST nodes.
+	(build_string): Allocate string with tree node.
+	(tree_code_size): Clean up assertions, don't allow requests
+	for "the size of a STRING_CST".
+	* tree.def (STRING_CST): Update comment.
+	* tree.h (TREE_STRING_POINTER): Adjust for change to STRING_CST.
+	(tree_string): Place contents of string in tree node.
+	* config/sh/sh.c (sh_handle_sp_switch_attribute): Duplicate string
+	from tree.
+
 2004-09-17  Zack Weinberg  <zack@codesourcery.com>
 
 	* Makefile.in (c-parse.o): Depend on $(C_PRAGMA_H).
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2004-09-18 02:18:55.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2004-09-18 14:37:39.000000000 +0000
@@ -1,3 +1,9 @@
+2004-09-16  Geoffrey Keating  <geoffk@apple.com>
+
+	PR pch/13361
+	* cp/lex.c (handle_pragma_interface): Duplicate string from tree.
+	(handle_pragma_implementation): Likewise.
+
 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
 	    Zack Weinberg  <zack@codesourcery.com>
 

I am friendly script caring about memory consumption in GCC.  Please contact
jh@suse.cz if something is going wrong.

The results can be reproduced by building 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.

Yours testing script.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]