https://bugs.openjdk.java.net/browse/JDK-8245126
Webrev:
http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/kitchensink-comp.1/
Summary:
The Kitchensink stress test with the Instrumentation module enabled does
a lot of class retransformations in parallel with all other stressing.
It provokes the assert at the compiled code installation time:
assert(!method->is_old()) failed: Should not be installing old methods
The problem is that the CompileBroker::invoke_compiler_on_method in C2 version
(non-JVMCI tiered compilation) is missing the check that exists in the JVMCI
part of implementation:
2148 // Skip redefined methods 2149 if (target_handle->is_old()) { 2150 failure_reason = "redefined method"; 2151 retry_message = "not retryable"; 2152 compilable = ciEnv::MethodCompilable_never; 2153 } else { . . . 2168 } The fix is to add this check.
Testing: Ran Kitchensink test with the Instrumentation module enabled in mach5 multiple times for 100 times. Without the fix the test normally fails a couple of times in 200 runs. It does not fail with the fix anymore. Will also submit hs tiers1-5. Thanks, Serguei