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] track heap usage with -fmem-report


On Fri, 8 Mar 2013, Andi Kleen wrote:

> Richard Biener <rguenther@suse.de> 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
> ago)

The point was to eventually amend -ftime-report output with
per-pass heap usage as well (in addition to the GC stats it
prints).  Yes, I know of various tools that can track
memory usage - but those are not per-pass nor are they
built in.

Richard.


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