RFR: 8143014: Access PtrQueue member offsets through derived classes

Kim Barrett kim.barrett at oracle.com
Tue Nov 17 19:25:51 UTC 2015


On Nov 17, 2015, at 1:12 PM, Jon Masamitsu <jon.masamitsu at oracle.com> wrote:
> 
> Kim,
> 
> Looks good although I have one question.  In
> http://cr.openjdk.java.net/~kbarrett/8143014/webrev.00/src/share/vm/gc/g1/satbMarkQueue.hpp.frames.html
> 
>  
>   76   using PtrQueue::byte_width_of_index;
> 
> 
> http://cr.openjdk.java.net/~kbarrett/8143014/webrev.00/src/share/vm/gc/g1/dirtyCardQueue.hpp.frames.html
> 
>   80   using PtrQueue::byte_width_of_index;
> 
> Are the "using" statements actually needed?  Or are they future proofing?

Thanks Jon.

They are needed because in PtrQueue those names are protected.  These using declarations
expose these as public names in the derived classes, so they can be accessed by clients, e.g
SATBMarkQueue::byte_width_of_index() can be called by compiler code.




More information about the hotspot-gc-dev mailing list