RFR: 8263976: Remove block allocation from BasicHashtable

Ioi Lam iklam at openjdk.java.net
Mon Mar 22 22:00:43 UTC 2021


On Mon, 22 Mar 2021 21:54:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/utilities/hashtable.cpp line 64:
>> 
>>> 62: 
>>> 63:   if (DumpSharedSpaces) {
>>> 64:     // Avoid random bits in structure padding so we can have deterministic content in CDS archive
>> 
>> Hmm, the sequence looks a little odd: the constructor initializes some fields, they are then zeroed here, and then initialized again below ....
>> 
>> Actually, I think you can get rid of the `if (DumpSharedSpaces)` block for now. I am not sure if it's needed. Deterministic CDS archive is broken anyway (https://bugs.openjdk.java.net/browse/JDK-8253495).
>> 
>> That way you can get rid of the entry->set_xxx below as well.
>
> Yes, I'd like to make the constructors initialize the fields, but didn't know what to do about this block zeroing code.  Would you have to add it back with deterministic GC?

> Yes, I'd like to make the constructors initialize the fields, but didn't know what to do about this block zeroing code. Would you have to add it back with deterministic CDS?

I am not sure yet. I think we may not need it because CDS doesn't copy HashtableEntries into the archive anymore.

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

PR: https://git.openjdk.java.net/jdk/pull/3123


More information about the hotspot-dev mailing list