RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]
Coleen Phillimore
coleenp at openjdk.org
Thu Sep 1 12:33:16 UTC 2022
On Thu, 1 Sep 2022 12:21:30 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The fact it is a weakhandle is an implementation detail. The table simply records whether a PD (wrapped in a WeakHandle) has been seen.
>
> Since I know what this table does, either comment is fine if it helps someone understand it.
> The "map each PD to itself" is pretty odd to me too. How about collect each PD for fast lookup in a hashtable? The code says how it's mapped. There isn't that much code and it's easy to see how the Key is mapped.
// The ProtectionDomainCacheTable maps all java.security.ProtectionDomain objects that are
// registered by DictionaryEntry::add_protection_domain() to a unique entry. The entry
// is a WeakHandle that holds the protection domain oop.
or points to.... either is accurate.
-------------
PR: https://git.openjdk.org/jdk/pull/10043
More information about the hotspot-dev
mailing list