RFR: JDK-8176520: Improve the accuracy of the instance size in hprof heap dumps [v2]

Chris Plummer cjplummer at openjdk.org
Tue Feb 20 21:32:54 UTC 2024


On Mon, 19 Feb 2024 09:00:16 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> > Can't the instance size as currently computed be computed by hprof tool vendors using class information already present in the hprof file (list of class fields and types, class hierarchy info, etc)? 

> That would still be based on VM independent sizes.

Yes, that is the point. The current version of the value is VM independent. If any tool is relying on that fact, then after Alex's changes they can still calculate the VM independent size. The info they need for that is still in the hprof file, and this calculation will also work with hprof files created before Alex's changes.

> I think what Alex is looking for is to have HotSpot VM specific sizes be included in the heap dump. I suspect this will require rev'ing the HPROF format, in which case it opens the potential to include object layout information

If it requires a rev of the HPROF spec, then likely the change is just going to be tabled, which would be unfortunate since this change is very simple to make and was requested by an hprof tool vendor. It would be good if just a CSR could be used to document the change. You can argue that it is not even a spec change, but just a clarification of the spec combined with updating the heapdump code to support the clarification.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17855#issuecomment-1955139965


More information about the serviceability-dev mailing list