Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-02 Thread Coleen Phillimore
On Fri, 2 Sep 2022 05:26:45 GMT, David Holmes wrote: >> // 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 dom

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-02 Thread Coleen Phillimore
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 12:29:41 GMT, Coleen Phillimore wrote: >> 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

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Thu, 1 Sep 2022 12:21:30 GMT, Coleen Phillimore 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

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Thu, 1 Sep 2022 07:53:07 GMT, David Holmes wrote: >> "mapping a PD to a unique Weakhandle" is not an implementation detail. It's >> the only useful API provided by this class: >> >> >> WeakHandle obj = >> ProtectionDomainCacheTable::add_if_absent(protection_domain); >> >> >> and that's t

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Coleen Phillimore
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 07:23:03 GMT, Ioi Lam wrote: >> "mapping to itself" is more useful than "mapping ... to a unique Weakhandle" >> - which is even more of an internal implementation detail. I found the use >> of this table very hard to discern based on the internal use of the >> hashtable, as

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread David Holmes
On Thu, 1 Sep 2022 07:12:25 GMT, Ioi Lam wrote: > I am utterly confused about why we need ProtectionDomainCacheTable at all. It tracks whether we have seen this PD before so that `validate_protection_domain` can skip the Java upcall to `checkPackageAccess`. - PR: https://git.openj

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Thu, 1 Sep 2022 06:51:21 GMT, David Holmes wrote: >> “Mapping to itself” is how this table works internally. I am not sure if >> this information is useful here. But the purpose of this table is really to >> keep track of all PDs that have been registered and not yet garbage >> collected. >

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-09-01 Thread Ioi Lam
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-08-31 Thread David Holmes
On Thu, 1 Sep 2022 06:42:06 GMT, Ioi Lam wrote: >> src/hotspot/share/classfile/protectionDomainCache.hpp line 33: >> >>> 31: >>> 32: // The ProtectionDomainCacheTable maps all >>> java.security.ProtectionDomain objects that are >>> 33: // registered by DictionaryEntry::add_protection_domain()

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-08-31 Thread Ioi Lam
On Thu, 1 Sep 2022 04:12:32 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix comments, add assert. > > src/hotspot/share/classfile/protectionDomainCache.hpp line 33: > >> 31: >> 32: // T

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-08-31 Thread David Holmes
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-08-31 Thread David Holmes
On Wed, 31 Aug 2022 12:39:08 GMT, Coleen Phillimore wrote: >> Please review this simple conversion for the ProtectionDomainCacheTable from >> Old Hashtable to ResourceHashtable. There are specific tests for this table >> in test/hotspot/jtreg/runtime/Dictionary and >> serviceability/dcmd/vm/D

Re: RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]

2022-08-31 Thread Coleen Phillimore
> Please review this simple conversion for the ProtectionDomainCacheTable from > Old Hashtable to ResourceHashtable. There are specific tests for this table > in test/hotspot/jtreg/runtime/Dictionary and > serviceability/dcmd/vm/DictionaryStatsTest.java. > Also tested with tier1-7. Coleen Phil