RFR (S) 8150669: C1 intrinsic for Class.isPrimitive
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Mar 1 20:06:12 UTC 2016
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/20160301/8a8d26ad/signature-0001.asc>
More information about the hotspot-compiler-dev
mailing list