RFR[XS] JDK-8178543 - Optimize Klass::is_shared()

Ioi Lam ioi.lam at oracle.com
Thu Apr 13 17:41:03 UTC 2017


Hi Calvin & Coleen,

Thanks for the review. I will make the change as Coleen suggested and push.

- Ioi

On 4/13/17 8:15 PM, coleen.phillimore at oracle.com wrote:
>
> This looks good.  Glad there was an access flag bit left.
>
> http://cr.openjdk.java.net/~iklam/jdk10/8178543-klass-is-shared.v01/src/share/vm/oops/klassVtable.cpp.udiff.html 
>
>
> I'd make it #ifdef ASSERT instead.  I don't think anyone's built 
> optimized in a long time tho.
>
> Thanks,
> Coleen
>
> On 4/13/17 5:30 AM, Ioi Lam wrote:
>> Hi, please review this small start-up enhancement:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8178543
>> http://cr.openjdk.java.net/~iklam/jdk10/8178543-klass-is-shared.v01/
>>
>> We have a benchmark that shows Klass::is_shared() is called very 
>> frequently during InstanceKlass::link_class_impl, and costs about 2% 
>> of the start-up time.
>>
>> The fix is simple -- instead of walking the list of CDS shared 
>> regions, use a new bit in Klass::_access_flags
>>
>> Thanks
>> - Ioi
>



More information about the hotspot-dev mailing list