RFR (S) 8150669: C1 intrinsic for Class.isPrimitive

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Mar 2 09:47:09 UTC 2016


Thanks Christian and Vladimir for reviews!

For this patch as well, RBT
hotspot/test/:hotspot_all,vm.runtime.testlist,vm.compiler.testlist is
clean, will push once gatekeeper greenlights the integration.

-Aleksey

On 03/02/2016 10:39 AM, Vladimir Ivanov wrote:
> Looks good!
> 
> Best regards,
> Vladimir Ivanov
> 
> On 3/1/16 11:06 PM, Aleksey Shipilev wrote:
>> Hi Vladimir,
>>
>> Fixed all your findings in a new webrev:
>>    http://cr.openjdk.java.net/~shade/8150669/webrev.03/
>>
>> Passes JPRT -testset hotspot; microbenchmarks; new test.
>>
>> On 03/01/2016 01:07 PM, Vladimir Ivanov wrote:
>>> I have a general question: why did you decide to intrinsify the method
>>> into a native call? Class::is_primitive looks pretty trivial to
>>> translate it right into machine code:
>>>    bool java_lang_Class::is_primitive(oop java_class) {
>>>      bool is_primitive = (java_class->metadata_field(_klass_offset) ==
>>> NULL);
>>> ...
>>>      return is_primitive;
>>>    }
>>
>> Yeah, previous version was just a stripped-down isInstance intrinsic
>> code. But you are right, we can just read class data without messing
>> with runtime calls, which improves performance even without
>> canonicalizing:
>>    http://cr.openjdk.java.net/~shade/8150669/notes.txt
>>
>> Cheers,
>> -Aleksey
>>
>>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160302/e8052f54/signature.asc>


More information about the hotspot-compiler-dev mailing list