United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7095243 : Disambiguate ReferenceProcessor::_discoveredSoftRefs

Details
Type:
Enhancement
Submit Date:
2011-09-26
Status:
Closed
Updated Date:
2012-01-23
Project Name:
JDK
Resolved Date:
2012-01-23
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u2
Fixed Versions:
hs23 (b03)

Related Reports
Backport:

Sub Tasks

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
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.
                                     
2011-09-26
EVALUATION

See Description.
                                     
2011-09-26
EVALUATION

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

See main CR
                                     
2011-10-28



Hardware and Software, Engineered to Work Together