< prev index next >

test/hotspot/jtreg/compiler/c2/irTests/blackhole/BlackholeSyncEATest.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2022, Red Hat, Inc. All rights reserved.
+  * Copyright (c) 2022, 2024 Red Hat, Inc. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -36,12 +36,14 @@
  import jdk.test.lib.Asserts;
  
  public class BlackholeSyncEATest {
  
      public static void main(String[] args) {
+         // Turn off PEA or it will elide the lock of synchronized (o){} before escaping.
          TestFramework.runWithFlags(
              "-XX:+UnlockExperimentalVMOptions",
+             "-XX:-DoPartialEscapeAnalysis",
              "-XX:CompileCommand=blackhole,compiler.c2.irTests.blackhole.BlackholeSyncEATest::blackhole",
              "-XX:CompileCommand=dontinline,compiler.c2.irTests.blackhole.BlackholeSyncEATest::dontinline"
          );
      }
  
< prev index next >