JDK-8085983 : G1CollectedHeap::collection_set_iterate_from() has unused code and can be simplified
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-06-08
  • Updated: 2018-06-21
  • Resolved: 2018-04-10
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
9Fixed
Related Reports
Relates :  
Description
G1CollectedHeap::collection_set_iterate_from() has an unnecessary "if" statement
in which the "then" part can never be executed.

    if (cl->doHeapRegion(cur) && false) {
      cl->incomplete();
      return;
    }

This can be simplified to

  guarantee(!cl->doHeapRegion(cur), err_msg("doHeapRegion returned true"));

Also, G1CollectedHeap::collection_set_iterate() can be simplified because none of the callers
pass a closure where doHeapRegion() returns true.


Comments
Fixed by: 8159978: Use an array to store the collection set regions instead of linking through regions
10-04-2018

Issue is fixed by JDK-8159978: Use an array to store the collection set regions instead of linking through regions
10-04-2018