This is the mail archive of the
mailing list for the GCC project.
Re: C++ and gather-detailed-mem-stats
On Wed, 15 Aug 2012, Gabriel Dos Reis wrote:
> On Wed, Aug 15, 2012 at 7:34 PM, Lawrence Crowl <firstname.lastname@example.org> wrote:
> > Would it be more productive to ensure that existing tools, like
> > valgrind, are effective with gcc?
> Indeed. Richard's patch strikes me as the way to go with
> the issue he raised.
It's indeed a very special issue - existing memory profiling tools
do not play well with custom memory management like garbage collection.
Also we are interested in statistics for high-level functions that
eventually allocate memory deep down in helpers, so custom tools
would need to have a way to specify those "interesting" functions
and perform unwinding when accounting allocations. Certainly a
tool that can fully handle what we need here would be appreciated,
but to my knowledge it does not exist yet.
The builtins are generic and seem useful and they happen to solve
this existing issue - which means case closed for me ;)