JDK-8206424 : Use locking for cleaning ProtectionDomainTable
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-07-05
  • Updated: 2019-05-28
  • Resolved: 2018-08-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The ProtectionDomainTable is cleaned during a safepoint but can be cleaned concurrently by the ServiceThread.
Comments
It is inaccurate to say it can be "cleaned concurrently" as the service thread can not run concurrently with a safepoint. Moving this to the service thread allows the safepoint to potentially be shortened, by allowing the cleanup to happen in the service thread after the safepoint. However this also means that the next safepoint can't begin until the service thread has finished this cleanup. So the extent to which this allows other mutators to run concurrently with the cleanup, depends on the amount of work the service thread must do and the frequency of safepoints.
22-08-2018

Or use SystemDictionary_lock around inserts and cleanup, and measure performance. That would be simpler.
18-07-2018