request for review (M): 4965777 GC changes to support use of discovered field for pending references

Stefan Karlsson stefan.karlsson at oracle.com
Mon Sep 5 12:05:05 UTC 2011


Hi Ramki,

Your changes seems to be based on my changes to remove the sentinelRef 
and use a self-looping end in the discovered lists, so my review is 
based on that.

referenceProcessor.cpp:

Why do you want to change the variable name to next_d?
   325   oop next_d = refs_list.head();

This seems to be incorrect. The discovered list should never end with 
NULL, since its self-looping.
   348         java_lang_ref_Reference::set_discovered(obj, old); // old 
may be NULL


instanceRefKlass.cpp:

Typo, discoveredd -> discovered
   95     // In the case of older JDKs which do not use the discoveredd
  175     // In the case of older JDKs which do not use the discoveredd
  399     // In the case of older JDKs which do not use the discoveredd

Why was the contains check moved?
   207   if (!oopDesc::is_null(heap_oop) && contains(referent_addr)) {


Reference.java:

The last element in the pending list should point back to itself.
   102      *     pending:   next element in the pending list (or null 
if last)


StefanK

On 09/05/2011 11:16 AM, Ramki Ramakrishna wrote:
>
> CR's 4243978 and  4268317 have proposed to use the discovered field of
> a java.lang.ref.reference object to link the objects in the pending list.
> This requires changes in both GC and in the reference handler code.
> The JVM adaptsso as to allow it to run either inside a newer JDK which 
> uses the
> discovered field to link the references or inside an older JDK which 
> uses the
> next field for that purpose. Although the JDK part of the changes are
> also being submitted for review here, that part will be integrated as 
> a separate
> CR and changeset into the JDK repo following the integration of the 
> JVM changes
> into an appropriate version of the HotSpot (express) repos.
>
>   JVM webrev:  http://cr.openjdk.java.net/~ysr/4965777/hotspot/webrev/
>   JDK webrev:   http://cr.openjdk.java.net/~ysr/4965777/jdk/webrev/
>
> Many thanks to Mandy Chung and John Coomes for advice and for
> earlier reviews; and to Mandy for additional testing help.
>
> Thanks for any other reviews or comments.
> -- ramki




More information about the hotspot-gc-dev mailing list