Re: [PATCH] track heap usage with -fmem-report

2013-03-08 Thread Richard Biener
On Fri, 8 Mar 2013, Andi Kleen wrote: > Richard Biener 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 > > (an

Re: [PATCH] track heap usage with -fmem-report

2013-03-08 Thread Andi Kleen
Richard Biener 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

Re: [PATCH] track heap usage with -fmem-report

2013-03-07 Thread Steven Bosscher
On Thu, Mar 7, 2013 at 1:59 PM, Richard Biener wrote: > Index: gcc/toplev.c > === > *** gcc/toplev.c(revision 196517) > --- gcc/toplev.c(working copy) > *** along with GCC; see the file COPYING3. > *** 74,79

Re: [PATCH] track heap usage with -fmem-report

2013-03-07 Thread Richard Biener
On Thu, 7 Mar 2013, Marek Polacek wrote: > On Thu, Mar 07, 2013 at 01:59:31PM +0100, Richard Biener wrote: > > > > This hacky patch tracks per-pass heap usage with -fmem-report > > using glibc malloc hooks (which are deprecated!? eh ... I can > > see no replacement?) > > The "replacement" is t

Re: [PATCH] track heap usage with -fmem-report

2013-03-07 Thread Marek Polacek
On Thu, Mar 07, 2013 at 01:59:31PM +0100, Richard Biener wrote: > > This hacky patch tracks per-pass heap usage with -fmem-report > using glibc malloc hooks (which are deprecated!? eh ... I can > see no replacement?) The "replacement" is that we should intercept the malloc calls instead (as tho

[PATCH] track heap usage with -fmem-report

2013-03-07 Thread Richard Biener
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 impl