6730587: TEST: com/sun/jdi/MonitorFrameInfoTest.java fails with -server -Xcomp

Fix test to prevent C2 escape analysis from deleting the required synchronized blocks

Reviewed-by: swamyv
This commit is contained in:
Jim Holmlund 2008-07-28 12:37:52 -07:00
parent 6a3f9fd998
commit ee07f33cc5

View File

@ -49,6 +49,7 @@ class MonitorTestTarg {
static void foo2() {
Object l1 = new Object();
synchronized(l1) {
System.out.println("executing foo2 " + l1);
foo3();
}
}
@ -59,6 +60,7 @@ class MonitorTestTarg {
System.out.println("Howdy!");
Object l1 = new Object();
synchronized(l1) {
System.out.println("executing main" + l1);
foo1();
}
}