This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
A recent patch decreased GCC's memory consumption.
- From: gcctest at suse dot de
- To: jh at suse dot cz, gcc-regression at gcc dot gnu dot org
- Date: Sat, 25 Nov 2006 02:19:53 +0000
- Subject: A recent patch decreased 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 empty function compilation at -O0 level:
Overall memory needed: 18254k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 422k
Leak: 2271k
Overhead: 446k
GGC runs: 3
comparing empty function compilation at -O0 -g level:
Overall memory needed: 18270k
Peak memory use before GGC: 2260k
Peak memory use after GGC: 1967k
Maximum of released memory in single GGC run: 293k
Garbage: 424k
Leak: 2303k
Overhead: 450k
GGC runs: 3
comparing empty function compilation at -O1 level:
Overall memory needed: 18354k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 427k
Leak: 2274k
Overhead: 446k
GGC runs: 4
comparing empty function compilation at -O2 level:
Overall memory needed: 18366k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k
Leak: 2274k
Overhead: 447k
GGC runs: 4
comparing empty function compilation at -O3 level:
Overall memory needed: 18366k
Peak memory use before GGC: 2233k
Peak memory use after GGC: 1940k
Maximum of released memory in single GGC run: 293k
Garbage: 430k
Leak: 2274k
Overhead: 447k
GGC runs: 4
comparing combine.c compilation at -O0 level:
Overall memory needed: 28442k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k
Leak: 6461k
Overhead: 4869k
GGC runs: 279
comparing combine.c compilation at -O0 -g level:
Overall memory needed: 30534k
Peak memory use before GGC: 10859k
Peak memory use after GGC: 10489k
Maximum of released memory in single GGC run: 2415k
Garbage: 37429k
Leak: 9271k
Overhead: 5537k
GGC runs: 271
comparing combine.c compilation at -O1 level:
Overall memory needed: 40282k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2274k
Garbage: 57478k
Leak: 6515k
Overhead: 6226k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2866k
Garbage: 74877k
Leak: 6621k
Overhead: 8472k
GGC runs: 411
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4100k
Garbage: 112603k
Leak: 6688k
Overhead: 13022k
GGC runs: 462
Overall memory needed: 28442k
Peak memory use before GGC: 9309k
Peak memory use after GGC: 8848k
Maximum of released memory in single GGC run: 2665k
Garbage: 36852k
Leak: 6461k
Overhead: 4869k
GGC runs: 279
comparing combine.c compilation at -O1 level:
Overall memory needed: 40282k
Peak memory use before GGC: 17299k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2274k
Garbage: 57478k
Leak: 6515k
Overhead: 6226k
GGC runs: 356
comparing combine.c compilation at -O2 level:
Overall memory needed: 29806k
Peak memory use before GGC: 17295k
Peak memory use after GGC: 17124k
Maximum of released memory in single GGC run: 2866k
Garbage: 74877k
Leak: 6621k
Overhead: 8472k
GGC runs: 411
comparing combine.c compilation at -O3 level:
Overall memory needed: 28906k
Peak memory use before GGC: 18423k
Peak memory use after GGC: 17851k
Maximum of released memory in single GGC run: 4100k
Garbage: 112603k
Leak: 6688k
Overhead: 13022k
GGC runs: 462
comparing insn-attrtab.c compilation at -O0 level:
Overall memory needed: 88246k
Peak memory use before GGC: 69793k
Peak memory use after GGC: 44203k
Maximum of released memory in single GGC run: 36964k
Garbage: 129066k
Leak: 9520k
Overhead: 17001k
GGC runs: 216
comparing insn-attrtab.c compilation at -O0 -g level:
Overall memory needed: 89426k
Peak memory use before GGC: 70942k
Peak memory use after GGC: 45459k
Maximum of released memory in single GGC run: 36964k
Garbage: 130494k
Leak: 10951k
Overhead: 17380k
GGC runs: 212
comparing insn-attrtab.c compilation at -O1 level:
Overall memory needed: 114178k
Peak memory use before GGC: 90379k
Peak memory use after GGC: 83741k
Maximum of released memory in single GGC run: 31852k
Garbage: 277776k
Leak: 9362k
Overhead: 29792k
GGC runs: 221
comparing insn-attrtab.c compilation at -O2 level:
Overall memory needed: 129386k
Peak memory use before GGC: 92608k
Peak memory use after GGC: 84720k
Maximum of released memory in single GGC run: 30398k
Garbage: 317198k
Leak: 9364k
Overhead: 36371k
GGC runs: 244
comparing insn-attrtab.c compilation at -O3 level:
Ovarall memory allocated via mmap and sbrk decreased from 134238k to 129422k, overall -3.72%
Overall memory needed: 134238k -> 129422k
Peak memory use before GGC: 92634k
Peak memory use after GGC: 84746k
Maximum of released memory in single GGC run: 30585k
Garbage: 318053k
Leak: 9367k
Overhead: 36606k
GGC runs: 248
comparing Gerald's testcase PR8361 compilation at -O0 level:
Overall memory needed: 120002k
Peak memory use before GGC: 93312k
Peak memory use after GGC: 92385k
Maximum of released memory in single GGC run: 20013k
Garbage: 207743k
Leak: 47730k
Overhead: 20983k
GGC runs: 409
comparing Gerald's testcase PR8361 compilation at -O0 -g level:
Overall memory needed: 132502k
Peak memory use before GGC: 105441k
Peak memory use after GGC: 104390k
Maximum of released memory in single GGC run: 19646k
Garbage: 214331k
Leak: 70689k
Overhead: 26600k
GGC runs: 380
comparing Gerald's testcase PR8361 compilation at -O1 level:
Overall memory needed: 119138k
Peak memory use before GGC: 97923k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 446417k
Leak: 50112k
Overhead: 32789k
GGC runs: 559
comparing Gerald's testcase PR8361 compilation at -O2 level:
Overall memory needed: 119162k
Peak memory use before GGC: 97924k
Peak memory use after GGC: 95711k
Maximum of released memory in single GGC run: 18552k
Garbage: 505749k
Leak: 50796k
Overhead: 40002k
GGC runs: 613
comparing Gerald's testcase PR8361 compilation at -O3 level:
Overall memory needed: 118994k
Peak memory use before GGC: 97968k
Peak memory use after GGC: 96997k
Maximum of released memory in single GGC run: 18932k
Garbage: 526793k
Leak: 50369k
Overhead: 40926k
GGC runs: 627
comparing PR rtl-optimization/28071 testcase compilation at -O0 level:
Overall memory needed: 137962k
Peak memory use before GGC: 81913k
Peak memory use after GGC: 58792k
Maximum of released memory in single GGC run: 45493k
Garbage: 147245k
Leak: 7541k
Overhead: 25304k
GGC runs: 82
comparing PR rtl-optimization/28071 testcase compilation at -O0 -g level:
Overall memory needed: 138138k
Peak memory use before GGC: 82546k
Peak memory use after GGC: 59426k
Maximum of released memory in single GGC run: 45558k
Garbage: 147415k
Leak: 9249k
Overhead: 25769k
GGC runs: 88
comparing PR rtl-optimization/28071 testcase compilation at -O1 level:
Overall memory needed: 424334k -> 424266k
Peak memory use before GGC: 205233k
Peak memory use after GGC: 201009k
Maximum of released memory in single GGC run: 101903k
Garbage: 272136k
Leak: 47606k
Overhead: 31282k
GGC runs: 101
comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
Overall memory needed: 352386k
Peak memory use before GGC: 206006k
Peak memory use after GGC: 201782k
Maximum of released memory in single GGC run: 108808k
Garbage: 352361k
Leak: 48189k
Overhead: 47027k
GGC runs: 110
comparing PR rtl-optimization/28071 testcase compilation at -O3 -fno-tree-pre -fno-tree-fre level:
Overall memory needed: 781310k -> 781378k
Peak memory use before GGC: 314929k
Peak memory use after GGC: 293272k
Maximum of released memory in single GGC run: 165197k
Garbage: 494379k
Leak: 65522k
Overhead: 59885k
GGC runs: 98
Head of the ChangeLog is:
--- /usr/src/SpecTests/sandbox-britten-memory/x86_64/mem-result/ChangeLog 2006-11-24 08:08:03.000000000 +0000
+++ /usr/src/SpecTests/sandbox-britten-memory/gcc/gcc/ChangeLog 2006-11-25 00:37:31.000000000 +0000
@@ -1,3 +1,40 @@
+2006-11-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/29955
+ * c-tree.h (c_maybe_initialize_eh): New prototype.
+ * c-decl.c (finish_decl): Move EH initialization...
+ (c_maybe_initialize_eh): ... here. New function.
+ * c-parser.c (c_parser_omp_construct): Call c_maybe_initialize_eh
+ if not #pragma omp atomic.
+
+ PR c/29736
+ * c-common.c (handle_vector_size_attribute): Disallow VECTOR_TYPE
+ or UNION_TYPE inner types.
+
+2006-11-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR tree-opt/29964
+ * ipa-pure-const.c (check_tree): If the original tree
+ is volatile return early and say the function is not pure
+ nor const. Remove the volatile check for writes.
+ (analyze_function): Print out the result of the local
+ analysis pass.
+
+2006-11-24 Joseph Myers <joseph@codesourcery.com>
+
+ * config/rs6000/eabispe.h (TARGET_DEFAULT): Include
+ MASK_STRICT_ALIGN.
+ * config/rs6000/linuxspe.h (TARGET_DEFAULT): Likewise.
+ * config/rs6000/rs6000.c (rs6000_override_options): Use
+ MASK_STRICT_ALIGN for 8540 and 8548. Add MASK_STRICT_ALIGN to
+ POWERPC_MASKS.
+
+2006-11-24 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config/s390.c (s390_emit_compare_and_swap): New function.
+ (s390_expand_cs_hqi, s390_expand_atomic): Call
+ s390_emit_compare_and_swap.
+
2006-11-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (return_addr_rtx): Change 0xe0400002 to -532676606.
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.