JDK-8226232 : Move merge heap roots code out from G1RemSetScanState
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-17
  • Updated: 2019-08-06
  • Resolved: 2019-07-17
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 14
14 b07Fixed
Related Reports
Blocks :  
Relates :  
Description
G1RemSetScanState is a helper class containing too many nested classes.

Improve readability by refactoring this code.

The original comment from the review for JDK-8213108 is:

"  82 class G1RemSetScanState : public CHeapObj<mtGC> {

I have a preference for non-trivial nested classes being declared in
the owning class but defined outside it. Similarly for non-trivial
functions. I find the style used here pretty hard to read, having
trouble finding the APIs for classes and the boundaries between
functions and between classes. (I've seen code editors that can help with that, but not everyone uses such.)

There are certainly lots of non-trivial classes in hotspot whose
entire definition is nested in the class definition.  (Not that I'm a
fan of such.)  But this seems kind of excessive.  The class definition is nearly 500 lines long, with 7(?) nested classes.  (I was almost surprised not to find any multiply nested classes; unless I missed them.)

(And I *do* like nested classes as a scoping mechanism, just not laid out like this.)"

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/dec1d532c000 User: tschatzl Date: 2019-07-17 14:33:48 +0000
17-07-2019