Thanks Alan! On 12/29/2012 02:53 PM, Alan Bateman wrote: > 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.
Sorry, I fail to follow this reasoning. I thought HPROF was about dumping the actual info from the VM? What's the downside for publishing the actual instance size as the part of class metainfo? Is the only consideration being the format "purity" (which, btw, clashes with "WARNING: This format is still considered highly experimental" clause in HPROF format description), or is it the strive to rather add new attributes than change the existing attributes? > 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. Ok, we can go there, and that adds some lag for the tools. Would the prototype implementation of new format be enough to get the ball rolling? > 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. Is that post-mortem? The alignment and padding info might be lost and/or inconsistent at that point already. -Aleksey.
