提交 ad0ee1da 编写于 作者: J jjh

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

Summary: Fix test to prevent C2 escape analysis from deleting the required synchronized blocks
Reviewed-by: swamyv
上级 a4a366a7
...@@ -49,6 +49,7 @@ class MonitorTestTarg { ...@@ -49,6 +49,7 @@ class MonitorTestTarg {
static void foo2() { static void foo2() {
Object l1 = new Object(); Object l1 = new Object();
synchronized(l1) { synchronized(l1) {
System.out.println("executing foo2 " + l1);
foo3(); foo3();
} }
} }
...@@ -59,6 +60,7 @@ class MonitorTestTarg { ...@@ -59,6 +60,7 @@ class MonitorTestTarg {
System.out.println("Howdy!"); System.out.println("Howdy!");
Object l1 = new Object(); Object l1 = new Object();
synchronized(l1) { synchronized(l1) {
System.out.println("executing main" + l1);
foo1(); foo1();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册