C++ and gather-detailed-mem-stats

Richard Guenther rguenther@suse.de
Thu Aug 16 08:35:00 GMT 2012

On Wed, 15 Aug 2012, Gabriel Dos Reis wrote:

> On Wed, Aug 15, 2012 at 7:34 PM, Lawrence Crowl <crowl@google.com> 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 ;)


More information about the Gcc mailing list