RFR(XS) 8145579: SimpleThresholdPolicy assumes non-trivial methods to be trivial
dean.long at oracle.com
dean.long at oracle.com
Mon Dec 4 21:07:08 UTC 2017
Hi Aleksey. Thanks for the review,
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.
dl
> Thanks,
> -Aleksey
>
>
More information about the hotspot-compiler-dev
mailing list