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]

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 combine.c compilation at -O0 level:
    Overall memory needed: 24892k
    Peak memory use before GGC: 9665k
    Peak memory use after GGC: 8977k
    Maximum of released memory in single GGC run: 2790k
    Garbage: 42285k
    Leak: 6723k
    Overhead: 5888k
    GGC runs: 328

comparing combine.c compilation at -O1 level:
    Overall memory needed: 16860k -> 16864k
    Peak memory use before GGC: 9245k
    Peak memory use after GGC: 8771k
    Maximum of released memory in single GGC run: 2147k
    Garbage: 65825k -> 65832k
    Leak: 7184k
    Overhead: 8578k -> 8578k
    GGC runs: 530 -> 531

comparing combine.c compilation at -O2 level:
    Overall memory needed: 24852k -> 24848k
    Peak memory use before GGC: 18293k
    Peak memory use after GGC: 18108k
    Maximum of released memory in single GGC run: 2549k
    Garbage: 89011k -> 89018k
    Leak: 7158k
    Overhead: 11733k
    GGC runs: 492 -> 491

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 7242k to 7270k, overall 0.39%
    Overall memory needed: 25124k -> 25128k
    Peak memory use before GGC: 18301k
    Peak memory use after GGC: 18108k
    Maximum of released memory in single GGC run: 3129k
    Garbage: 119057k -> 119071k
    Leak: 7242k -> 7270k
    Overhead: 15814k -> 15814k
    GGC runs: 544

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 85588k
    Peak memory use before GGC: 73387k
    Peak memory use after GGC: 45373k
    Maximum of released memory in single GGC run: 37597k
    Garbage: 153190k
    Leak: 11550k
    Overhead: 19638k
    GGC runs: 268

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 101612k
    Peak memory use before GGC: 76705k
    Peak memory use after GGC: 65860k
    Maximum of released memory in single GGC run: 37085k
    Garbage: 307178k
    Leak: 11652k
    Overhead: 40173k
    GGC runs: 386

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 158880k
    Peak memory use before GGC: 121385k
    Peak memory use after GGC: 92477k
    Maximum of released memory in single GGC run: 33312k
    Garbage: 405474k
    Leak: 11490k
    Overhead: 53052k
    GGC runs: 308

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 158892k
    Peak memory use before GGC: 121387k
    Peak memory use after GGC: 92479k
    Maximum of released memory in single GGC run: 33312k
    Garbage: 406291k
    Leak: 11512k
    Overhead: 53183k
    GGC runs: 312

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 127352k
    Peak memory use before GGC: 103099k
    Peak memory use after GGC: 102077k
    Maximum of released memory in single GGC run: 21523k
    Garbage: 247456k
    Leak: 53781k
    Overhead: 42888k
    GGC runs: 346

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 121456k
    Peak memory use before GGC: 112543k
    Peak memory use after GGC: 100719k
    Maximum of released memory in single GGC run: 20027k
    Garbage: 697119k
    Leak: 59055k
    Overhead: 99699k
    GGC runs: 524

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 121452k
    Peak memory use before GGC: 112544k
    Peak memory use after GGC: 100719k
    Maximum of released memory in single GGC run: 20027k
    Garbage: 793219k
    Leak: 59938k
    Overhead: 117844k
    GGC runs: 607

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 124388k
    Peak memory use before GGC: 115286k
    Peak memory use after GGC: 102545k
    Maximum of released memory in single GGC run: 21387k
    Garbage: 854821k
    Leak: 61124k
    Overhead: 126207k
    GGC runs: 609

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2005-06-13 10:14:36.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2005-06-13 19:31:23.000000000 +0000
@@ -1,3 +1,27 @@
+2005-06-13  David Edelsohn  <edelsohn@gnu.org>
+
+	Revert scc_operand patch.
+	* config/rs6000/predicates.md (scc_operand): Delete.
+	* config/rs6000/rs6000.md (scc_operand): Change to scc_eq_operand.
+
+2005-06-13  Jakub Jelinek  <jakub@redhat.com>
+
+	* trans-expr.c (gfc_conv_function_call): Return int instead of
+	void.  Use a local variable for has_alternate_specifier and
+	return it.  Avoid modification of function type's return value
+	in place, since it may be shared.
+	* trans.h (has_alternate_specifier): Remove.
+	(gfc_conv_function_call): Change return type.
+	* trans-stmt.c (has_alternate_specifier): Remove.
+	(gfc_trans_call): Add a local has_alternate_specifier variable,
+	set it from gfc_conv_function_call return value.
+
+2005-06-13  Zdenek Dvorak  <dvorakz@suse.cz>
+
+	PR middle-end/21985
+	* fold-const.c (split_address_to_core_and_offset): Always return
+	the address of the base object.
+
 2005-06-13  Bernd Schmidt  <bernd.schmidt@analog.com>
 
 	* doc/invoke.texi (Blackfin Options): Document -mlong-calls.
@@ -146,6 +170,7 @@
 	tag if VAR has just one in its may_aliases list.
 
 2005-06-10  Fariborz Jahanian <fjahanian@apple.com>
+
 	* rs6000/predicates.md (scc_operand): New.
 	* rs6000/rs6000.md : Use scc_operand for eq:SI compares.
 
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog.cp	2005-06-13 04:27:32.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/cp/ChangeLog	2005-06-13 19:31:24.000000000 +0000
@@ -1,3 +1,22 @@
+2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
+
+	PR c++/20789
+	* decl.c (cp_finish_decl): Clear runtime runtime initialization if
+	in-class decl's initializer is bad.
+
+	PR c++/21929
+	* parser.c (struct cp_parser): Document that scope could be
+	error_mark.
+	(cp_parser_diagnose_invalid_type_name): Cope with error_mark for
+	scope.
+	(cp_parser_nested_name_specifier): Return NULL_TREE on error.
+	(cp_parser_postfix_expression): Deal with null or error_mark
+	scope.
+	(cp_parser_elaborated_type_specifier): Adjust
+	cp_parser_nested_name_specifier call.
+
+	* parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
+
 2005-06-12  Roger Sayle  <roger@eyesopen.com>
 
 	PR c++/21930


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.


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