RFR (S) 8135033: C1 should fast-path Object.class.isInstance(obj) to true

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Sep 4 10:35:22 UTC 2015


Thank you, Igor.

But the change does not seem to be correct:
Object.class.isInstance(null) should be false, not true. Therefore, my
fastpath misses a nullcheck for second argument. This was caught by some
VMSQE tests when I tried to JPRT the massaged version. I'll see what can
be done about that.

Cheers,
-Aleksey

On 09/04/2015 02:10 AM, Igor Veresov wrote:
> Looks good to me.
> 
> igor
> 
>> On Sep 3, 2015, at 2:07 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
>>
>> Hi,
>>
>> Continuing on VarHandles saga, more C1 quirks show up. Let's fix a
>> simple one: Object.class.isInstance(obj) should fold to "true". C2
>> handles this well, but not C1 (this is further exacerbated when tiered
>> policy decides Class.cast-holding method is trivial):
>>  https://bugs.openjdk.java.net/browse/JDK-8135033
>>
>> Patch:
>>  http://cr.openjdk.java.net/~shade/8135033/webrev.00/
>>
>> Testing:
>>  * JPRT
>>  * Targeted microbenchmarks, eyeballing assembly
>>
>> Thanks,
>> -Aleksey
>>
> 


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


More information about the hotspot-compiler-dev mailing list