The hprof format for heap dumps does not contain object layout information from the VM that produced the dump. Adding such information to hprof format seems to be the right way to fix this issue. There were attempts to fix HPROF format, but they were dismissed with the bottom-line "we just need a better format". So it looks like this problem will not be fixed in JDK any time soon and with GH-399, it is probably time to improve the computation of instance size in VisualVM itself. Currently VisualVM does not try to guess anything and relies only on hprof format. It will never be 100% accurate, but with some heuristics, it can be improved substantially.