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


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?

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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