[gclist] GC & profiling

Fergus Henderson fjh@cs.mu.oz.au
Sun, 22 Apr 2001 23:27:48 +1000


On 19-Apr-2001, Boehm, Hans <hans_boehm@hp.com> wrote:
> I agree with Eliot that it would be useful to profile allocation separately.

Yes, we do that already actually -- we've had heap allocation profiling
for a few years now.

What our current profiler doesn't do is to (1) separate or exclude time
spent in GC from the time profile, or (2) make use of the allocation
profile to fairly allocate time spent in GC up the call graph for the
time profile.  Doing (2) would be nice, but unfortunately I think that
for us it would also be quite a bit of work to implement, so for now
we just want to do the former.  Just separating out the time spent in
GC to a separate entry in the time profile is sufficient, I think; if
the user sees that a lot of time was spent in GC then they will know to
look at the allocation profile.  In contrast, with our current profiler,
the user might potentially just see an abnormally high time for some
procedure `foo'; the profile will make it look like `foo' is responsible
for the program running slowly, but in fact the time might be spent in GC,
and it might be some other routine `bar' which was responsible for
doing most of the memory allocations which necessitated the GC.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.