[PATCH] Fix tree statistics with -fmem-report.
Richard Biener
richard.guenther@gmail.com
Wed Mar 14 10:11:00 GMT 2018
On Wed, Mar 14, 2018 at 10:51 AM, Martin Liška <mliska@suse.cz> wrote:
> Hi.
>
> Current code that tracks memory statistics wrongly decremented a counter
> based on t_kind, which is an enum value and thus a constant:
>
> - tree_node_counts[(int) t_kind]--;
>
> That's obviously a mistake.
>
> May I install the patch after reg tests&bootstrap?
Ok.
Richard.
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2018-03-14 Martin Liska <mliska@suse.cz>
>
> * tree.c (record_node_allocation_statistics): Use
> get_stats_node_kind.
> (get_stats_node_kind): New function extracted from
> record_node_allocation_statistics.
> (free_node): Use get_stats_node_kind.
> ---
> gcc/tree.c | 94 +++++++++++++++++++++++++-------------------------------------
> 1 file changed, 38 insertions(+), 56 deletions(-)
>
>
More information about the Gcc-patches
mailing list