RFR (S) 8150669: C1 intrinsic for Class.isPrimitive
Christian Thalinger
christian.thalinger at oracle.com
Tue Mar 1 21:01:38 UTC 2016
> On Mar 1, 2016, at 10:06 AM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
>
> Hi Vladimir,
>
> Fixed all your findings in a new webrev:
> http://cr.openjdk.java.net/~shade/8150669/webrev.03/
Even better.
>
> 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