< prev index next >
test/jdk/jfr/event/compiler/TestCodeSweeper.java
Print this page
rev 13431 : Fix JFR code cache test failures
*** 57,67 ****
*
* @library /lib /
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
! * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:-SegmentedCodeCache -XX:+WhiteBoxAPI jdk.jfr.event.compiler.TestCodeSweeper
*/
public class TestCodeSweeper {
private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
private static final int COMP_LEVEL_SIMPLE = 1;
--- 57,67 ----
*
* @library /lib /
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
! * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI jdk.jfr.event.compiler.TestCodeSweeper
*/
public class TestCodeSweeper {
private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
private static final int COMP_LEVEL_SIMPLE = 1;
*** 157,174 ****
blobs.add(addr);
}
// Trigger the vm/code_cache/full event by compiling one more
// method. This also triggers the vm/compiler/failure event.
- Asserts.assertTrue(WHITE_BOX.addCompilerDirective(directive) == 1);
- try {
if (!WHITE_BOX.enqueueMethodForCompilation(method, COMP_LEVEL_FULL_OPTIMIZATION)) {
WHITE_BOX.enqueueMethodForCompilation(method, COMP_LEVEL_SIMPLE);
}
! } finally {
! WHITE_BOX.removeCompilerDirective(1);
! }
// Free memory
for (Long blob : blobs) {
WHITE_BOX.freeCodeBlob(blob);
}
--- 157,171 ----
blobs.add(addr);
}
// Trigger the vm/code_cache/full event by compiling one more
// method. This also triggers the vm/compiler/failure event.
if (!WHITE_BOX.enqueueMethodForCompilation(method, COMP_LEVEL_FULL_OPTIMIZATION)) {
WHITE_BOX.enqueueMethodForCompilation(method, COMP_LEVEL_SIMPLE);
}
!
! Thread.sleep(5000);
// Free memory
for (Long blob : blobs) {
WHITE_BOX.freeCodeBlob(blob);
}
< prev index next >