On Fri, 16 Feb 2024 15:25:38 GMT, Alan Bateman <al...@openjdk.org> wrote:
> > When I proposed this change 10 years ago, there was a push back: > > https://bugs.openjdk.org/browse/JDK-8005604. > > Right, the HPROF format was created to be independent of VM or any > configuration. So JDK-8176520 is not really a bug, instead it is changing the > meaning of the instance size field. Not opposed to doing that but I'm > wondering if it means the version bytes at the start should be updated. I'm > also wondering where the HPROF format is documented and if it now needs to be > clarified. I think a CSR should be created to track this too. Thank you for the feedback @AlanBateman! Yes, this is not a bug, I've changed issue type to "enhancement". I don't think we need to bump format version. The format is not changed. New meaning of the field can be easy detected by checking "instance size" value for `lava.lang.Object` class (or any other class with no fields) - if it's > 0, then the field for all classes contain real instance size. There is no official hprof format spec (but we have an issue to create it), the only spec are comments in the source code (2 identical copies in VM heapDumper C++ code and in SA java code). The description of the field is quite general: "u4 instance size (in bytes)" I can change it to "instance size in the heap (in bytes)" ------------- PR Comment: https://git.openjdk.org/jdk/pull/17855#issuecomment-1949332767