8222670 patch review: prevent downgraded tasks from recompiling
Tobias Hartmann
tobias.hartmann at oracle.com
Fri May 3 12:29:01 UTC 2019
On 03.05.19 02:21, Liu, Xin wrote:
> Thanks for the review. I fixed copyrights and the typo of clearMethodState0.
> Here is the new revision.
> https://cr.openjdk.java.net/~xliu/8222670/webrev.04/
Looks good to me but I think you should also add:
if (PrintTieredEvents) {
print_event(REMOVE_FROM_QUEUE, method, method, task->osr_bci(), (CompLevel) task->comp_level());
}
> But why is that? If a downgraded compilation succeeded at level 2, shouldn't a re-compilation at the
> same level be detected by CompileBroker::compilation_is_complete() in CompileBroker::compile_method()?
>
> That's the very root cause of level2 recompilation.
> In CompileBroker::compile_method(), its input argument is comp_level = 3.
> CompileBroker::compilation_is_complete returns false because codecache only has level=2 nmethod.
> I don't know why, but hotpsot is also very stubborn. It will request level = 3 again and again. All of them are downgraded to level=2 when they dequeue.
>
> Level2RecompilationTest simulates this process. I didn't make it up. I observe the symptom in some real services as follows.
> https://bugs.openjdk.java.net/secure/attachment/82079/lvl2_recomp_spring.log.zip
Okay, got it.
Thanks,
Tobias
More information about the hotspot-compiler-dev
mailing list