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 needed: 25261k -> 25245k
    Peak memory use before GGC: 9336k
    Peak memory use after GGC: 8648k
    Maximum of released memory in single GGC run: 2930k
    Garbage: 42982k -> 42982k
    Leak: 6089k -> 6094k
    Overhead: 5653k -> 5657k
    GGC runs: 364

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26741k -> 26605k
    Peak memory use before GGC: 9434k -> 9293k
    Peak memory use after GGC: 8871k -> 8736k
    Maximum of released memory in single GGC run: 2061k -> 2065k
    Garbage: 72091k -> 72112k
    Leak: 6676k -> 6490k
    Overhead: 11450k -> 11176k
    GGC runs: 577 -> 576

comparing combine.c compilation at -O2 level:
    Overall memory needed: 29893k -> 29853k
    Peak memory use before GGC: 12772k -> 12738k
    Peak memory use after GGC: 12612k
    Maximum of released memory in single GGC run: 2577k -> 2584k
    Garbage: 87337k -> 87362k
    Leak: 6430k -> 6310k
    Overhead: 16008k -> 15730k
    GGC runs: 576

comparing combine.c compilation at -O3 level:
    Overall memory needed: 21460k -> 21428k
    Peak memory use before GGC: 13349k -> 13179k
    Peak memory use after GGC: 12723k -> 12612k
    Maximum of released memory in single GGC run: 3440k -> 3419k
    Garbage: 117309k -> 117244k
    Leak: 7015k -> 6921k
    Overhead: 21187k -> 20806k
    GGC runs: 643 -> 642

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118640k
    Peak memory use before GGC: 79535k
    Peak memory use after GGC: 46181k
    Maximum of released memory in single GGC run: 43441k
    Garbage: 163178k -> 163180k
    Leak: 10644k -> 10646k
    Overhead: 20458k -> 20460k
    GGC runs: 307

comparing insn-attrtab.c compilation at -O1 level:
  Overall memory allocated via mmap and sbrk increased from 130612k to 131300k, overall 0.53%
    Overall memory needed: 130612k -> 131300k
    Peak memory use before GGC: 90811k -> 89943k
    Peak memory use after GGC: 70897k -> 70593k
    Maximum of released memory in single GGC run: 42003k
    Garbage: 462709k -> 462869k
    Leak: 11074k -> 10990k
    Overhead: 74729k -> 73908k
    GGC runs: 463 -> 465

comparing insn-attrtab.c compilation at -O2 level:
    Overall memory needed: 209828k -> 206068k
    Peak memory use before GGC: 105772k -> 105510k
    Peak memory use after GGC: 86457k -> 86160k
    Maximum of released memory in single GGC run: 35799k -> 35801k
    Garbage: 512291k -> 512522k
    Leak: 10956k -> 10910k
    Overhead: 82804k -> 82004k
    GGC runs: 385 -> 384

comparing insn-attrtab.c compilation at -O3 level:
    Overall memory needed: 209832k -> 206068k
    Peak memory use before GGC: 105781k -> 105512k
    Peak memory use after GGC: 86466k -> 86162k
    Maximum of released memory in single GGC run: 35798k -> 35801k
    Garbage: 513569k -> 513811k
    Leak: 11010k -> 10954k
    Overhead: 82991k -> 82187k
    GGC runs: 394 -> 393

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 112008k
    Peak memory use before GGC: 88772k
    Peak memory use after GGC: 87648k
    Maximum of released memory in single GGC run: 19623k
    Garbage: 254153k -> 253938k
    Leak: 58644k -> 57113k
    Overhead: 45995k -> 45784k
    GGC runs: 367 -> 369

comparing Gerald's testcase PR8361 compilation at -O1 level:
  Ovarall memory allocated via mmap and sbrk decreased from 100936k to 94572k, overall -6.73%
    Overall memory needed: 100936k -> 94572k
    Peak memory use before GGC: 87755k
    Peak memory use after GGC: 86603k
    Maximum of released memory in single GGC run: 19231k
    Garbage: 595146k -> 584779k
    Leak: 60773k -> 59038k
    Overhead: 130170k -> 125430k
    GGC runs: 602 -> 626

comparing Gerald's testcase PR8361 compilation at -O2 level:
  Ovarall memory allocated via mmap and sbrk decreased from 101968k to 95372k, overall -6.92%
    Overall memory needed: 101968k -> 95372k
    Peak memory use before GGC: 87755k
    Peak memory use after GGC: 86604k
    Maximum of released memory in single GGC run: 19231k
    Garbage: 648463k -> 639086k
    Leak: 61351k -> 59622k
    Overhead: 153793k -> 149134k
    GGC runs: 636 -> 662

comparing Gerald's testcase PR8361 compilation at -O3 level:
  Ovarall memory allocated via mmap and sbrk decreased from 109668k to 102520k, overall -6.97%
    Overall memory needed: 109668k -> 102520k
    Peak memory use before GGC: 94953k -> 94818k
    Peak memory use after GGC: 89119k -> 87983k
    Maximum of released memory in single GGC run: 19979k -> 19962k
    Garbage: 694659k -> 685429k
    Leak: 61703k -> 59961k
    Overhead: 165586k -> 160823k
    GGC runs: 630 -> 649

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-10-25 17:37:47.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-10-25 22:14:12.000000000 +0000
@@ -1,3 +1,51 @@
+2004-10-25  Kenneth Zadeck <zadeck@naturalbridge.com>
+	* gcc/Makefile.in: removed ggc for cgraphunit.
+	* gcc/cgraph.c.dump_cgraph_node: removed static var analysis.
+	* gcc/cgraph.h: removed static var analysis data structures and calls.
+	* gcc/cgraphunit.c: 
+	cgraph_mark_local_and_external_functions:changed name to 
+		cgraph_mark_local_functions
+	(print_order,convert_UIDs_in_bitmap,new_static_vars_info,
+	cgraph_reset_static_var_maps,get_global_static_vars_info,
+	get_global_statics_not_read,get_global_statics_not_written,searchc,
+	cgraph_reduced_inorder,has_proper_scope_for_analysis,check_rhs_var,
+	check_lhs_var,get_asm_expr_operands,process_call_for_static_vars,
+	scan_for_static_refs,cgraph_characterize_statics_local,
+	clear_static_vars_maps,cgraph_propagate_bits,cgraph_characterize_statics):
+	removed.
+	(cgraph_optimize,init_cgraph): removed calls to static vars analysis
+	* gcc/tree-dfa.c find_referenced_vars: removed call to static vars
+	analysis 
+	* gcc/tree-flow.h static_vars_info: removed 
+	* gcc/tree-ssa-operands.c (add_call_clobber_ops,add_call_read_ops):
+	removed calls to static vars analysis.
+	get_call_expr_operands: removed callee variable.
+
+2004-10-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* cfg.c (unchecked_make_edge, redirect_edge_succ,
+	redirect_edge_pred): Use VEC_safe_push instead of
+	VEC_safe_insert.
+	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
+
+2004-10-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* cfgloopmanip.c (loopify): Take two more arguments true_edge
+	and false_edge.
+	* cfgloop.h: Adjust the corresponding prototype.
+	* loop-unswitch.c (unswitch_loop): Adjust a call to loopify.
+	* tree-ssa-loop-manip.c (tree_ssa_loop_version): Likewise.
+
+2004-10-25  Jakub Jelinek  <jakub@redhat.com>
+
+	* dwarf2out.c (rtl_for_decl_location): Avoid segfault if
+	DECL_INCOMING_RTL is NULL.
+
+2004-10-25  Steven Bosscher  <stevenb@suse.de>
+
+	* timevar.def (TV_FIND_REFERENCED_VARS): New.
+	* tree-dfa.c (pass_referenced_var): Use it.
+
 2004-10-25  Roger Sayle  <roger@eyesopen.com>
 	    John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 

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]