JDK-8184330 : Remove sun.nio.ch.Util.atBugLevel() either completely or at least get rid of volatile field bugLevel
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-07-13
  • Updated: 2019-02-15
  • Resolved: 2017-08-04
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 10
10 b19Fixed
Related Reports
CSR :  
Relates :  
Description
The implementation for honoring the system property "sun.nio.ch.bugLevel" uses the same pattern as was used for "sun.nio.cs.bugLevel". The method sun.nio.ch.Util.atBugLevel() returns a value that is stored in a volatile field. The synchronization efforts that "volatile" implies can significantly harm performance on some platforms.

With JDK-8182743, the handling for "sun.nio.cs.bugLevel" has been removed completely. Although "sun.nio.ch.bugLevel" is probably not queried at performance relevant places, such as the former was, the aim of this bug is to try to remove this as well or at least get rid of the volatile.