JDK-7095243 : Disambiguate ReferenceProcessor::_discoveredSoftRefs
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7u2
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-09-26
  • Updated: 2012-01-23
  • Resolved: 2012-01-23
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 8 Other
8Fixed hs23Fixed
Description
Background:

In the reference processor class there is an array of lists that is used to hold reference objects discovered during GCs. This arrays hold all the reference object types with each reference type being given a disctint pointer into this array (example below is shown for 4 worker threads)

_discoveredSoftRefs ->    [ 0]: soft ref list for worker id 0
                          [ 1]: soft ref list for worker id 1
                          [ 2]: soft ref list for worker id 2
                          [ 3]: soft ref list for worker id 3
_discoveredWeakRefs ->    [ 4]: weak ref list for worker id 0
                          [ 5]: weak ref list for worker id 1
                          [ 6]: weak ref list for worker id 2
                          [ 7]: weak ref list for worker id 3
_discoveredFinalRefs ->   [ 8]: final ref list for worker id 0
                          [ 9]: final ref list for worker id 1
                          [10]: final ref list for worker id 2
                          [11]: final ref list for worker id 3
_discoveredPhantomRefs -> [12]: phantom ref list for worker id 0
                          [13]: phantom ref list for worker id 1
                          [14]: phantom ref list for worker id 2
                          [15]: phantom ref list for worker id 3

Sometimes we which to iterate over all the elemenets in the array and sometimes we just wish to iterate over the sub array for soft references. For both cases we refer array using the term _discoveredSoftRefs.

As part of the review for 6484982, it was suggested that this is confusing and should be cleaned up.

This CR is about disambiguating the role of _discoveredSoftRefs - in the cases where we are iterating over the entire array we would use a more generic term and use _discoveredSoftRefs when referring to the lists that contain soft references.

Comments
EVALUATION See main CR
28-10-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/bf2d2b8b1726
17-10-2011

SUGGESTED FIX * Add a new term _discovered_refs to which _discoveredSoftRefs points. * In code that walks the entire discovered ref list array - use the generic term.
26-09-2011

EVALUATION See Description.
26-09-2011