--- old/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java 2014-11-26 20:49:54.716203408 +0300 +++ new/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java 2014-11-26 20:49:54.464203412 +0300 @@ -149,7 +149,14 @@ public native Object[] getNMethod(Executable method, boolean isOsr); public native long allocateCodeBlob(int size, int type); public native void freeCodeBlob(long addr); - public native void forceNMethodSweep(); + public void forceNMethodSweep() { + try { + forceNMethodSweep0().join(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + public native Thread forceNMethodSweep0(); public native Object[] getCodeHeapEntries(int type); public native int getCompilationActivityMode(); public native Object[] getCodeBlob(long addr);