hotspot/test/compiler/membars/TestMemBarAcquire.java
changeset 40059 c2304140ed64
parent 26176 cc5975228236
--- a/hotspot/test/compiler/membars/TestMemBarAcquire.java	Tue Jul 12 08:42:46 2016 +0000
+++ b/hotspot/test/compiler/membars/TestMemBarAcquire.java	Tue Jul 12 18:24:48 2016 +0300
@@ -24,30 +24,34 @@
 /*
  * @test TestMemBarAcquire
  * @bug 8048879
- * @summary "Tests optimization of MemBarAcquireNodes"
- * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation TestMemBarAcquire
+ * @summary Tests optimization of MemBarAcquireNodes
+ * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation
+ *                   compiler.membars.TestMemBarAcquire
  */
+
+package compiler.membars;
+
 public class TestMemBarAcquire {
-  private volatile static Object defaultObj = new Object();
-  private Object obj;
+    private volatile static Object defaultObj = new Object();
+    private Object obj;
 
-  public TestMemBarAcquire(Object param) {
-    // Volatile load. MemBarAcquireNode is added after the
-    // load to prevent following loads from floating up past.
-    // StoreNode is added to store result of load in 'obj'.
-    this.obj = defaultObj;
-    // Overrides 'obj' and therefore makes previous StoreNode
-    // and the corresponding LoadNode useless. However, the
-    // LoadNode is still connected to the MemBarAcquireNode
-    // that should now release the reference.
-    this.obj = param;
-  }
+    public TestMemBarAcquire(Object param) {
+        // Volatile load. MemBarAcquireNode is added after the
+        // load to prevent following loads from floating up past.
+        // StoreNode is added to store result of load in 'obj'.
+        this.obj = defaultObj;
+        // Overrides 'obj' and therefore makes previous StoreNode
+        // and the corresponding LoadNode useless. However, the
+        // LoadNode is still connected to the MemBarAcquireNode
+        // that should now release the reference.
+        this.obj = param;
+    }
 
-  public static void main(String[] args) throws Exception {
-    // Make sure TestMemBarAcquire::<init> is compiled
-    for (int i = 0; i < 100000; ++i) {
-      TestMemBarAcquire p = new TestMemBarAcquire(new Object());
+    public static void main(String[] args) throws Exception {
+        // Make sure TestMemBarAcquire::<init> is compiled
+        for (int i = 0; i < 100000; ++i) {
+            TestMemBarAcquire p = new TestMemBarAcquire(new Object());
+        }
     }
-  }
 }