[lworld] RFR: 8272041: [lworld] CDS heap dump fails with primitive objects

Frederic Parain fparain at openjdk.java.net
Fri Aug 6 12:53:46 UTC 2021

On Fri, 6 Aug 2021 04:47:32 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> Two simple fixes to handle primitive objects when dumping the CDS heap:
> - When dumping the objects, we enter them into a hashtable. Do not use `oopDesc::identity_hash()` as the hashcode for this table.
> - When resetting the header of archived objects, do not call `oopDesc::identity_hash()` on primitive objects.

Looks good to me.

Just a question by curiosity, using object addresses instead of the identity hash code is likely to change the distribution of keys for the hashtable (all objects being in the same memory area and being aligned on heap words, some bits in their addresses are the same for all objects). Is it going to have a significant impact of the performance of the hashtable or is it negligeable?

Thank you,



Marked as reviewed by fparain (Committer).

PR: https://git.openjdk.java.net/valhalla/pull/525

More information about the valhalla-dev mailing list