This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug middle-end/37448] patch to compute alloc-pool stats correctly
- From: Ian Lance Taylor <iant at google dot com>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: "Hubicha\, Jan" <jh at suse dot cz>, Richard Guenther <richard dot guenther at gmail dot com>, Daniel Berlin <dberlin at dberlin dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 07 Oct 2008 07:48:58 -0700
- Subject: Re: [Bug middle-end/37448] patch to compute alloc-pool stats correctly
- References: <48DD5BBE.2010603@naturalbridge.com>
Kenneth Zadeck <zadeck@naturalbridge.com> writes:
> 2008-09-26 Kenneth Zadeck <zadeck@naturalbridge.com>
>
> PR rtl-optimization/37448
> alloc_pool_desc (elt_size): New field.
> alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc,
> pool_free): Properly keep track of desc->size.
> (print_statistics, dump_alloc_pool_statistics): Enhance the
> printing of statistics to print the number of elements.
> -/* Store information about each particular alloc_pool. */
> +/* Store information about each particular alloc_pool. Note that this
> + will underestimate the amount the amount of storage used by a small amount:
> + 1) The overhead in a pool is not accounted for.
> + 2) The unallocated elements in a block are not accounted for. Note
> + that this can at worst case be one element smaller that the block
> + size for that pool.
> +*/
Please put the */ at the end of the previous line.
I wonder if some of the types in alloc_pool_descriptor should be
size_t rather than int, though it's hard to imagine it making a
difference in real life.
OK with that change.
Thanks.
Ian