This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Heap profiling, of sorts


Several people pointed out significant bugs in my earlier patch.  (It didn't build with
-DLARGE_CONFIG, and it sometimes generated spurious error messages related to
"finalization" of statically allocated objects.)

Here's version 2. It should fix these problems.  And it tries to print Java types
as part of object descriptions.  (Comments on the implementation of gcj_describe_type_fn
in boehm.cc are especially appreciated.  There may be easier/better ways to do this.)
With this change this should be somewhat useful even on platforms where the GC doesn't
know how to unwind the stack.

It prints Java class names (after the allocating file and line number) if the object is
allocated with a gcj-style descriptor.  Note that arrays of objects tend to instead be
allocated as NORMAL (i.e. conservatively scanned, since they are guaranteed to introduce
no possibility of false references, and contain almost all pointers.)  Thus you should
typically read "NORMAL" as "Java array".

If there are no objections/corrections, I will check this into the trunk in a few days.

Hans

Attachment: gc_diffs2_ChangeLog
Description: Binary data

Attachment: gc_diffs2
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]