RFR(XS) 8145579: SimpleThresholdPolicy assumes non-trivial methods to be trivial

Aleksey Shipilev shade at redhat.com
Tue Dec 5 09:25:44 UTC 2017


On 12/04/2017 10:07 PM, dean.long at oracle.com wrote:
> On 12/4/17 12:10 PM, Aleksey Shipilev wrote:
>> On 12/04/2017 06:44 PM, dean.long at oracle.com wrote:
>>> https://bugs.openjdk.java.net/browse/JDK-8145579
>>> http://cr.openjdk.java.net/~dlong/8145579/webrev/
>>>
>>> This change fixes certain non-trivial methods being marked as trivial.  A method should only be
>>> marked as trivial if C2 cannot generate better code.  The two cases fixed here are calling
>>> intrinsics, and Object.<init>, which has a hidden call to register finalizers.
>> I am good with the fix, but my issue is with the essence of that shortcut. We can keep piling on
>> exceptions on top of exceptions to that triviality rule, or we can just dispense with the idea that
>> we can guess what methods are trivial and/or remember to fix it up every time something changes.
>>
>> Is it really worth falling back to C1 for trivial methods? I.e. is C2 compilation for those methods
>> too costly (which would seem counter-intuitive)? Can we remove that triviality check, and see if we
>> run fine without it?
> 
> I agree, we should take another look at that code.  We have reopened 8076988 to look into that for 11.

Thanks, that makes sense.

-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/20171205/2b720e53/signature.asc>


More information about the hotspot-compiler-dev mailing list