This is the mail archive of the gcc-patches@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]

Re: [PATCH] Reduce GC overhead by introducing extra bins for function and basic_block


On Mon, 19 Jun 2006, Mark Mitchell wrote:

> Richard Guenther wrote:
> > This addresses the fact that struct function is at the moment (on 32bit
> > platforms) 264 bytes large and allocated from the 512 bytes bucket, which
> > is quite a large overhead.  The same holds true for basic_block as of
> > detailed memory reporting.
> > 
> > Unfortunately(?) to work properly, the size_lookup array needs to be
> > extended for this (I also made the checks for out-of range sizes <
> > rather than <=, because the latter will access the array out-of-bounds).
> > 
> > More objects often allocated with non-neglible overhead are
> > struct var_ann_d, struct tree_ssa_name and phi nodes with two arguments.
> > But this quickly leads to a huge number of entries in 
> > extra_order_size_table, and the GC machinery does not explicitly handle
> > duplicate sizes (i.e. it will simply get empty bins resulting from dups).
> > 
> > Bootstrapped and tested on x86_64-unknown-linux-gnu.
> > 
> > Ok for mainline?
> 
> This seems like a good idea -- but what memory savings have you observed
> on what test cases?

There is a slight peak memory drop for tramp3d-v4 from 449MB to 447MB, but
it mainly reduces GC allocation overhead (same testcase).  Namely, before
the patches (this one and the cp_lexer buffer adjustment) we have

source location         Garbage		Freed          Leak         Overhead            Times
Total                1182395952        260047664     102837539      81528691         34856084

after the patches

Total                1118949500        197905976      98765340      26595804         34870857

Richard.

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]