RFR: 8203028: Simplify reference processing in light of JDK-8175797
kim.barrett at oracle.com
Fri May 25 15:58:44 UTC 2018
> On May 22, 2018, at 6:12 PM, Stefan Johansson <stefan.johansson at oracle.com> wrote:
> Hi Kim,
> On 2018-05-20 17:12, Kim Barrett wrote:
>>> On May 15, 2018, at 12:09 AM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>> New webrev, rebased to include JDK-8201491:
>>> New webrevs with above changes:
>>> full: http://cr.openjdk.java.net/~kbarrett/8203028/open.02/
> Thanks for doing this work to simplify the reference processing, really nice to not have to do special treatment of the next field. The change looks good.
>>> incr: http://cr.openjdk.java.net/~kbarrett/8203028/open.02.inc/
>> Following up on a suggestion from Mark Reinhold in the discussion of JDK-8203327
>> on the core-libs list, I’ve added the following comment to the Reference.queue field.
>> diff -r 98982cddbac0 -r 2429129c4d48 src/java.base/share/classes/java/lang/ref/Reference.java
>> --- a/src/java.base/share/classes/java/lang/ref/Reference.java Mon May 14 18:01:36 2018 -0400
>> +++ b/src/java.base/share/classes/java/lang/ref/Reference.java Sun May 20 11:06:48 2018 -0400
>> @@ -131,6 +131,14 @@
>> private T referent; /* Treated specially by GC */
>> + /* The queue this reference gets enqueued to by GC notification or by
>> + * calling enqueue().
>> + *
>> + * When registered: the queue with which this reference is registered.
>> + * enqueued: ReferenceQueue.ENQUEUE
>> + * dequeued: ReferenceQueue.NULL
>> + * unregistered: ReferenceQueue.NULL
>> + */
>> volatile ReferenceQueue<? super T> queue;
>> /* The link in a ReferenceQueue's list of Reference objects.
More information about the hotspot-gc-dev