CR 8005604: HPROF should report the actual instance size
Alan Bateman
Alan.Bateman at oracle.com
Sat Dec 29 02:53:13 PST 2012
On 29/12/2012 10:10, Aleksey Shipilev wrote:
> :
>
> Seems like that instance_size() method is used to populate both GC_CLASS
> and GC_INSTANCE. Would it be OK to push the VM-reported size to GC_CLASS
> only, and leave GC_INSTANCE intact?
>
I don't think it can be in either as the sizes in the HPROF dump are VM
and padding independent. A few years back there was discussion about
defining a new format or (better-still) API but it didn't happen. The
only thing I can suggest for the short term would be to rev the HPROF
format to define a new record that provides a better details on the
sizes and layout. It's a slippery slope of course. In the mean-time, at
least for the built-in heap dumper and the SA-based heap dumper, then
the object ID is the oop so it's possible to deduce something.
-Alan
More information about the serviceability-dev
mailing list