This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
Re: A recent patch increased GCC's memory consumption in some cases!
- From: Richard Guenther <rguenther at suse dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcctest at suse dot de, gcc-regression at gcc dot gnu dot org
- Date: Thu, 18 Jan 2007 10:25:36 +0100 (CET)
- Subject: Re: A recent patch increased GCC's memory consumption in some cases!
- References: <45AF1ABE.mail33C1LFAOG@suse.de> <20070118090252.GA23162@kam.mff.cuni.cz>
On Thu, 18 Jan 2007, Jan Hubicka wrote:
> >
> > comparing PR rtl-optimization/28071 testcase compilation at -O2 level:
> > Ovarall memory allocated via mmap and sbrk decreased from 365202k to 192018k, overall -90.19%
> > Peak amount of GGC memory allocated before garbage collecting increased from 207227k to 302461k, overall 45.96%
> > Peak amount of GGC memory still allocated after garbage collecting decreased from 192563k to 178766k, overall -7.72%
> > Amount of produced GGC garbage increased from 355277k to 586684k, overall 65.13%
> > Amount of memory still referenced at the end of compilation decreased from 30387k to 27902k, overall -8.91%
>
> This result is somewhat bogus, the memory consumption indeed peaks after
> 360MB. Richard, is it possible for your script to miss the real peak
> somehow? See http://www.suse.de/~aj/SPEC/amd64/memory/pr28071-O2.rep
> All the 240MB of memory are produced by schedule2 pass and we GGC it
> immediately, so I guess the peak happens just for a short time.
Well, it tracks the peak VM usage - independent on for how long it
happens. A more stable (less gc-change error-prone) quantity to
measure would be for example the sum of all allocations done. But of
course changing it will break all history.
Richard.
>
> Anyway, the savings are in general real - we manage to optimize the
> function before inlining better and produce a lot better resulting
> assembly. Originally dominator optimization reorganized stuff in so
> weird way it wasn't possible to cleanup (I think it is mentioned in the
> PR trail).
>
> Honza
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs