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: 25320k
    Peak memory use before GGC: 9566k
    Peak memory use after GGC: 8914k
    Maximum of released memory in single GGC run: 2649k
    Garbage: 40064k -> 40057k
    Leak: 6740k
    Overhead: 5738k -> 5738k
    GGC runs: 313

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26900k
    Peak memory use before GGC: 17435k
    Peak memory use after GGC: 17256k
    Maximum of released memory in single GGC run: 2308k
    Garbage: 62427k -> 62424k
    Leak: 6890k
    Overhead: 7487k -> 7487k
    GGC runs: 392

comparing combine.c compilation at -O2 level:
    Overall memory needed: 26900k
    Peak memory use before GGC: 17438k
    Peak memory use after GGC: 17256k
    Maximum of released memory in single GGC run: 2399k
    Garbage: 82367k -> 82367k
    Leak: 6976k
    Overhead: 10226k
    GGC runs: 461

comparing combine.c compilation at -O3 level:
    Overall memory needed: 26900k
    Peak memory use before GGC: 18453k
    Peak memory use after GGC: 17993k
    Maximum of released memory in single GGC run: 3491k -> 3495k
    Garbage: 113575k -> 113575k
    Leak: 7049k -> 7053k
    Overhead: 13950k -> 13950k
    GGC runs: 518

comparing insn-attrtab.c compilation at -O0 level:
  Amount of memory still referenced at the end of compilation increased from 9892k to 9908k, overall 0.16%
    Overall memory needed: 80948k
    Peak memory use before GGC: 69508k
    Peak memory use after GGC: 45045k
    Maximum of released memory in single GGC run: 36220k
    Garbage: 146687k -> 146686k
    Leak: 9892k -> 9908k
    Overhead: 19751k -> 19751k
    GGC runs: 247

comparing insn-attrtab.c compilation at -O1 level:
    Overall memory needed: 109264k
    Peak memory use before GGC: 92087k -> 92085k
    Peak memory use after GGC: 81246k -> 81244k
    Maximum of released memory in single GGC run: 32383k
    Garbage: 296338k -> 296341k
    Leak: 10076k
    Overhead: 36186k -> 36186k
    GGC runs: 245 -> 246

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 110872k
    Peak memory use before GGC: 93801k -> 93803k
    Peak memory use after GGC: 81341k -> 81343k
    Maximum of released memory in single GGC run: 31927k
    Garbage: 343618k -> 343615k
    Leak: 10059k
    Overhead: 44783k -> 44783k
    GGC runs: 274 -> 275

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 110836k -> 110840k
    Peak memory use before GGC: 93831k -> 93833k
    Peak memory use after GGC: 81371k -> 81373k
    Maximum of released memory in single GGC run: 32267k
    Garbage: 344268k -> 344265k
    Leak: 10063k
    Overhead: 44982k -> 44982k
    GGC runs: 279 -> 280

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 118424k
    Peak memory use before GGC: 95198k
    Peak memory use after GGC: 94250k
    Maximum of released memory in single GGC run: 20356k
    Garbage: 223714k
    Leak: 49472k
    Overhead: 37113k -> 37113k
    GGC runs: 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 108528k
    Peak memory use before GGC: 95331k
    Peak memory use after GGC: 93251k
    Maximum of released memory in single GGC run: 20233k
    Garbage: 564794k -> 564802k
    Leak: 52294k -> 52294k
    Overhead: 63643k -> 63643k
    GGC runs: 531

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 108532k
    Peak memory use before GGC: 95331k
    Peak memory use after GGC: 93252k
    Maximum of released memory in single GGC run: 20232k
    Garbage: 687278k -> 687276k
    Leak: 53428k
    Overhead: 76837k -> 76835k
    GGC runs: 618 -> 617

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 114212k -> 114208k
    Peak memory use before GGC: 96797k
    Peak memory use after GGC: 94327k
    Maximum of released memory in single GGC run: 20729k
    Garbage: 753507k -> 753507k
    Leak: 54360k
    Overhead: 81753k -> 81753k
    GGC runs: 629

Head of the ChangeLog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2006-02-08 19:27:04.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2006-02-09 05:53:25.000000000 +0000
@@ -1,5 +1,66 @@
 2006-02-08  Jeff Law  <law@redhat.com>
 
+	PR tree-optimization/21417
+	* tree-ssa-threadedge.c (thread_across_edge): Reject threading
+	across a backedge if the control statement at the end of the
+	block is data dependent on other statements in the same block.
+	(record_temporary_equivalences_from_stmts): Remove over-conservative
+	test for threading across backedges.
+
+	* tree-ssa-dce.c (remove_dead_statement): When removing a dead
+	control statement, handle all three special cases in the same
+	manner as they all have the same desired solution.  No longer
+	special case edge flag updating when the post dominator is
+	the exit block.
+
+2006-02-08  Roger Sayle  <roger@eyesopen.com>
+
+	* tree.def (CHAR_TYPE): Remove.
+	* dbxout.c (dbxout_type): Delete dead handling of CHAR_TYPE.
+	* dwarf2out.c (base_type_die, is_base_type): Likewise.
+	(gen_type_die) <ARRAY_TYPE>: Remove handling of CHAR_TYPE arrays.
+	(gen_string_type_die): Delete unreachable function.
+
+	* tree-pretty-print.c (dump_generic_node): Don't handle CHAR_TYPE.
+	* tree.c (build_int_cst_wide, type_contains_placeholder_1,
+	type_hash_eq, variably_modified_type_p, walk_type_fields): Likewise.
+	* tree.h (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Likewise.
+	* builtins.c (type_to_class): Likewise.
+	* fold-const.c (fold_convert, build_range_check,
+	merge_ranges): Likewise.
+	* expr.c (count_type_elements): Likewise.
+	* c-pretty-print.c (pp_c_type_specifier): Likewise.
+	* stor-layout.c (layout_type): Likewise.
+	* ipa-type-escape.c (type_to_consider): Likewise.
+	* gimplify.c (omp_firstprivatize_type_sizes,
+	gimplify_type_sizes): Likewise.
+	* explow.c (promote_mode): Likewise.
+	* tree-sra.c (is_sra_scalar_type): Likewise.
+	* varasm.c (output_constant): Likewise.
+	* tree-inline.c (remap_type_1): Likewise.
+	* convert.c (convert_to_pointer, convert_to_real,
+	convert_to_integer, convert_to_complex): Likewise.
+
+2006-02-08  Daniel Berlin  <dberlin@dberlin.org>
+
+	* df-scan.c (df_def_record_1): A set destination may
+	be a parallel regardless of mode.
+
+2006-02-08  Roger Sayle  <roger@eyesopen.com>
+
+	PR target/22209
+	* config/mips/mips.h (MIN_UNITS_PER_WORD): Don't define for libgcc.
+	* config/mips/_tilib.c: Remove.
+	* config/fixtfdi.c: New libgcc source file.
+	* config/fixunstfdi.c: New source file.
+	* config/floatditf.c: New source file.
+	* config/floatunditf.c: New souce file.
+	* config/mips/t-iris6 (LIB2FUNCS_EXTRA): Include the new source
+	files above instead of config/mips/_tilib.c.
+	* config/mips/t-linux64 (LIB2FUNCS_EXTRA): Likewise.
+
+2006-02-08  Jeff Law  <law@redhat.com>
+
 	PR tree-optimization/26169
 	* tree-vrp.c (execute_vrp): Perform any queued SSA updates before
 	threading jumps.


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]