Closed GoogleCodeExporter closed 9 years ago
Duly noted, but it's unlikely we'll get to this ourselves. But feel free to
implement something to that effect if you'd like! It should be pretty easy to
get
that information with the sampling in tcmalloc.cc -- in fact, if you set the
sample
rate high enough, the data is probably all right there already, and you just
need to
figure out a way to extract it.
Original comment by csilv...@gmail.com
on 17 Apr 2008 at 12:42
Another option, even simpler, would be to just use gprof (compile with -pg).
That
shouldn't slow down the program very much. Of course, you'd have to have
access to
the source code.
Original comment by csilv...@gmail.com
on 17 Apr 2008 at 12:49
Another observation: I think this functionality is already available via the
heap-profiler. If you get a heap profile for your program, and then run pprof
with
--alloc-objects, it should give you information about the number of objects
allocated
(rather than their size), which I believe is what you're asking for. Or
--inuse-objects if you're interested in seeing stuff that was never freed.
Note this is still sampling-based, so not 100% accurate numbers, but should be
good
for the kind of thing you're trying to do.
Original comment by csilv...@gmail.com
on 17 Apr 2008 at 10:22
Original issue reported on code.google.com by
visa_des...@yahoo.com
on 16 Apr 2008 at 4:34