RFR(S): 8174856: [TESTBUG] Missing DefineClass instances

David Holmes david.holmes at oracle.com
Tue Feb 14 23:46:07 UTC 2017

Hi Volker,

Can we just skip the test in -Xcomp mode?


On 15/02/2017 4:31 AM, Volker Simonis wrote:
> Hi,
> can I please have a reviewer and sponsor for the following fix:
> http://cr.openjdk.java.net/~simonis/webrevs/2017/8174856/
> https://bugs.openjdk.java.net/browse/JDK-8174856
> The runtime/Metaspace/DefineClass.java test introduced with 8173743
> fails if run in '-Xcomp' mode. There are actually two problems we
> observe:
> - for the "defineClass" and "defineClassParallel" cases we observe
> fewer instance classes than expected. This is because in -Xcomp mode
> the functions get compiled and deoptimized, but because we don't
> really use the defined classes, they are already removed before our
> first check. This problem can be easily fixed by inserting the classes
> into a global static list.
> - for the "redefineClass" case, if run in -Xcomp mode, the problem is
> that we get 10 different nmethods for each version of the class
> redefinition, and these nmethods keep the instance classes alive, even
> after their activation has been removed from the stack. The problem
> can be solved by manually deoptimizing the methods and subsequent
> sweeping of the code cache. Notice that this has to be done at least
> three times, because during every sweep process, the nmethods first
> transition from "non-entrant" to "zombie" before they are finally
> cleaned.
> Thank you and best regards,
> Volker

More information about the hotspot-runtime-dev mailing list