RFR: 8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present.
Vladimir Kozlov
kvn at openjdk.java.net
Thu Oct 1 16:55:04 UTC 2020
On Thu, 1 Oct 2020 16:50:06 GMT, Igor Veresov <iveresov at openjdk.org> wrote:
>> src/hotspot/share/compiler/tieredThresholdPolicy.cpp line 519:
>>
>>> 517: nmethod* osr_nm = inlinee->lookup_osr_nmethod_for(bci, expected_comp_level, false);
>>> 518: assert(osr_nm == NULL || osr_nm->comp_level() >= expected_comp_level, "lookup_osr_nmethod_for is broken");
>>> 519: if (osr_nm != NULL && osr_nm->comp_level() != comp_level) {
>>
>> Should you check '> comp_level' here? expected_comp_level could be CompLevel_simple and as result you can get our_nm
>> with lower level than current comp_level.
>
> No we shouldn't. That's intentional. Sometimes we have to go to the lower level (3->1 or 2->1) when the method is not
> compilable at level 4.
ok
-------------
PR: https://git.openjdk.java.net/jdk/pull/360
More information about the hotspot-compiler-dev
mailing list