JDK-8064947 : Clean up BarrierSet ctor/dtor
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-11-14
  • Updated: 2015-06-03
  • Resolved: 2015-01-28
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 9
9 b51Fixed
Related Reports
Relates :  
Description
BarrierSet is an abstract base class.  There is no need for its ctor to be public (it can be protected instead).  Its destructor should either be protected or public and virtual, with the former preferred if public not required by usage, which it better not be, given that it's presently non-virtual.

The ctor should also take an argument specifying the kind, rather than initializing _kind to Uninit and requiring derived classes to reassign _kind in their constructors.

Comments
For more some more background and details, see the later emails in the thread starting at http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2014-November/011279.html
17-11-2014

This is a followup from discussion of fix for JDK-8064721.
14-11-2014