RFR: 8292286: Convert PlaceholderTable to ResourceHashtable [v2]

Coleen Phillimore coleenp at openjdk.org
Mon Aug 15 18:19:42 UTC 2022


On Mon, 15 Aug 2022 17:14:22 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use Symbol::maybe increment or decrement refcount.
>
> src/hotspot/share/classfile/placeholders.cpp line 36:
> 
>> 34: #include "utilities/resourceHash.hpp"
>> 35: 
>> 36: class PlaceholderKey : public StackObj {
> 
> Since the PlaceholderKey is stored inside the _placeholders table, I think it shouldn't be declared as StackObj.

Ok, fixed.

> src/hotspot/share/classfile/placeholders.cpp line 46:
> 
>> 44:   }
>> 45:   static unsigned hash(PlaceholderKey const& k) {
>> 46:     return (unsigned) k._name->identity_hash();
> 
> Should this be XORed with _loader_data?

It wasn't before because it shared a hashcode with Dictionary, but now it doesn't anymore so I xor'ed it now.

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

PR: https://git.openjdk.org/jdk/pull/9854


More information about the hotspot-dev mailing list