[PATCH] Reduce GC overhead by introducing extra bins for function and basic_block
Mark Mitchell
mark@codesourcery.com
Mon Jun 19 17:22:00 GMT 2006
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
More information about the Gcc-patches
mailing list