On Mon, 19 Feb 2024 09:00:16 GMT, Alan Bateman <al...@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

Reply via email to