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: 25241k -> 25245k
    Peak memory use before GGC: 9329k
    Peak memory use after GGC: 8641k
    Maximum of released memory in single GGC run: 2926k
    Garbage: 42520k
    Leak: 6088k
    Overhead: 5657k
    GGC runs: 354

comparing combine.c compilation at -O1 level:
    Overall memory needed: 26577k -> 26573k
    Peak memory use before GGC: 9291k -> 9256k
    Peak memory use after GGC: 8730k -> 8733k
    Maximum of released memory in single GGC run: 2064k -> 2067k
    Garbage: 71893k -> 70549k
    Leak: 6484k -> 6484k
    Overhead: 11597k -> 11476k
    GGC runs: 569 -> 563

comparing combine.c compilation at -O2 level:
  Overall memory allocated via mmap and sbrk increased from 29805k to 29857k, overall 0.17%
    Overall memory needed: 29805k -> 29857k
    Peak memory use before GGC: 12705k
    Peak memory use after GGC: 12579k
    Maximum of released memory in single GGC run: 2578k -> 2579k
    Garbage: 87424k -> 85991k
    Leak: 6305k -> 6305k
    Overhead: 16312k -> 16184k
    GGC runs: 570 -> 567

comparing combine.c compilation at -O3 level:
  Amount of memory still referenced at the end of compilation increased from 6813k to 6845k, overall 0.47%
    Overall memory needed: 21400k -> 21356k
    Peak memory use before GGC: 13132k -> 13091k
    Peak memory use after GGC: 12579k
    Maximum of released memory in single GGC run: 3418k -> 3420k
    Garbage: 117386k -> 115186k
    Leak: 6813k -> 6845k
    Overhead: 21474k -> 21275k
    GGC runs: 636 -> 631

comparing insn-attrtab.c compilation at -O0 level:
    Overall memory needed: 118512k
    Peak memory use before GGC: 79408k
    Peak memory use after GGC: 46137k
    Maximum of released memory in single GGC run: 43357k
    Garbage: 161090k
    Leak: 10609k
    Overhead: 20460k
    GGC runs: 295

comparing insn-attrtab.c compilation at -O1 level:
  Peak amount of GGC memory allocated before garbage collecting run decreased from 89840k to 86893k, overall -3.39%
  Amount of produced GGC garbage decreased from 462072k to 445811k, overall -3.65%
    Overall memory needed: 130240k
    Peak memory use before GGC: 89840k -> 86893k
    Peak memory use after GGC: 70491k
    Maximum of released memory in single GGC run: 40959k
    Garbage: 462072k -> 445811k
    Leak: 10954k
    Overhead: 77023k -> 75545k
    GGC runs: 453 -> 451

comparing insn-attrtab.c compilation at -O2 level:
  Amount of produced GGC garbage decreased from 511440k to 495175k, overall -3.28%
    Overall memory needed: 205748k -> 205752k
    Peak memory use before GGC: 105256k -> 102310k
    Peak memory use after GGC: 85907k
    Maximum of released memory in single GGC run: 35657k
    Garbage: 511440k -> 495175k
    Leak: 10882k
    Overhead: 85123k -> 83644k
    GGC runs: 375 -> 373

comparing insn-attrtab.c compilation at -O3 level:
  Amount of produced GGC garbage decreased from 512715k to 496448k, overall -3.28%
    Overall memory needed: 205756k -> 205752k
    Peak memory use before GGC: 105258k -> 102312k
    Peak memory use after GGC: 85909k
    Maximum of released memory in single GGC run: 35657k
    Garbage: 512715k -> 496448k
    Leak: 10926k
    Overhead: 85307k -> 83828k
    GGC runs: 384 -> 382

comparing Gerald's testcase PR8361 compilation at -O0 level:
    Overall memory needed: 111960k -> 111956k
    Peak memory use before GGC: 88676k
    Peak memory use after GGC: 87634k
    Maximum of released memory in single GGC run: 19564k
    Garbage: 249098k
    Leak: 57105k
    Overhead: 45784k
    GGC runs: 364

comparing Gerald's testcase PR8361 compilation at -O1 level:
    Overall memory needed: 94576k
    Peak memory use before GGC: 87850k
    Peak memory use after GGC: 86403k
    Maximum of released memory in single GGC run: 19363k
    Garbage: 593544k -> 592152k
    Leak: 59030k -> 59030k
    Overhead: 132538k -> 132417k
    GGC runs: 628 -> 627

comparing Gerald's testcase PR8361 compilation at -O2 level:
    Overall memory needed: 95168k -> 95216k
    Peak memory use before GGC: 87850k
    Peak memory use after GGC: 86403k
    Maximum of released memory in single GGC run: 19363k
    Garbage: 651202k -> 649821k
    Leak: 59617k -> 59617k
    Overhead: 158863k -> 158740k
    GGC runs: 680 -> 677

comparing Gerald's testcase PR8361 compilation at -O3 level:
    Overall memory needed: 102916k -> 102808k
    Peak memory use before GGC: 94792k
    Peak memory use after GGC: 87880k
    Maximum of released memory in single GGC run: 19973k
    Garbage: 695233k -> 693804k
    Leak: 59953k -> 59953k
    Overhead: 171043k -> 170913k
    GGC runs: 660 -> 659

Head of changelog is:

--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog	2004-10-29 15:11:45.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog	2004-10-30 00:23:34.000000000 +0000
@@ -1,3 +1,54 @@
+2004-10-30  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-phinodes.c (create_phi_node): Don't zero PHI_REWRITTEN.
+
+2004-10-29 Jeff Law  <law@redhat.com>
+
+	* tree-ssa-dom.c (struct edge_info): New structure holding
+	edge equivalences and edge redirection information.
+	(get_eq_expr_value, record_dominating_conditions): Kill.
+	(propagate_to_outgoing_edges): Renamed from cprop_into_phis.
+	Call record_edge_info.
+	(allocate_edge_info, free_edge_info): New.
+	(tree_ssa_dominator_optimize): Use propagate_to_outgoing_edges
+	rather than cprop_into_phis.  Free all edge infos before threading
+	jumps.
+	(thread_across_edge): Allocate new edge info structures as needed
+	and store the redirection target into the edge info structure
+	instead of the edge's AUX field.
+	(dom_opt_initialize_block): Mark unused argument with ATTRIBUTE_UNUSED.
+	(record_equivalence_from_incoming_edge): Lose unnecessary argument.
+	Revamp code which finds and records equivalences associated with
+	edges to use saved data in the edge_info structure.
+	(record_equivalencs_from_phis): Similarly.
+	(dom_opt_finalize_block): Revamp code which finds and records
+	equivalences associated with edges to use saved data in the
+	edge_info structure.
+	(build_and_record_new_cond): New function.
+	(record_conditions): Use build_and_record_new_cond to record
+	dominating conditions.
+	(record_edge_info): New function.
+	(record_range): Tighten test for conditions which create
+	useful range records.
+
+2004-10-29  Geoffrey Keating  <geoffk@apple.com>
+
+	* config/rs6000/darwin-fallback.c: Include <mach/thread_status.h>.
+
+2004-10-29  Stan Shebs  <shebs@apple.com>
+
+	* config/rs6000/darwin-tramp.asm: Make more 64-bit-friendly.
+
+2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* tree-phinodes.c (allocate_phi_node): New.
+	(make_phi_node, resize_phi_node): Use it.
+
+2004-10-29  David Edelsohn  <edelsohn@gnu.org>
+
+	* config/rs6000/sysv4.h (TARGET_POWER): Define as 0.
+	* config/rs6000/darwin.h (TARGET_POWER): Define as 0.
+
 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* tree-phinodes.c (make_phi_node, resize_phi_node): Don't zero

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]