RFR (S) 8150669: C1 intrinsic for Class.isPrimitive
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Mar 2 07:39:39 UTC 2016
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
>
>
More information about the hotspot-compiler-dev
mailing list