This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] track heap usage with -fmem-report
- From: Andi Kleen <andi at firstfloor dot org>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 08 Mar 2013 07:04:58 -0800
- Subject: Re: [PATCH] track heap usage with -fmem-report
- References: <alpine.LNX.firstname.lastname@example.org>
Richard Biener <email@example.com> writes:
> This hacky patch tracks per-pass heap usage with -fmem-report
> using glibc malloc hooks (which are deprecated!? eh ... I can
> see no replacement?)
> Still somewhat broken accounting for the overall numbers
> (and peak memory use, that is).
> But it's a start. And it uses internal glibc allocator
> implementation details ... (eh). At least it's low-overhead.
I found it much simpler to just LD_PRELOAD tcmalloc and use
its excellent debugging support.
I think it makes (with debugging disabled) run LTO run
a few percent faster too (but ran those numbers some time
firstname.lastname@example.org -- Speaking for myself only