Skip to content

Commit

Permalink
[GR-52162] Recursive lightweight locking.
Browse files Browse the repository at this point in the history
PullRequest: graal/17008
  • Loading branch information
mur47x111 committed Mar 7, 2024
2 parents 3dc8e25 + 2da2b65 commit c6acdc3
Show file tree
Hide file tree
Showing 30 changed files with 252 additions and 239 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.hotspot.test;

import java.io.IOException;

import org.junit.Assume;
import org.junit.Test;

import jdk.graal.compiler.core.test.SubprocessTest;
import jdk.graal.compiler.replacements.test.MonitorTest;
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;

public class LightweightLockingTest extends SubprocessTest {

public void testMonitor() {
MonitorTest t = new MonitorTest();
t.test0();
t.test01();
t.test02();
t.test101();
t.test102();
t.test2();
t.test3();
t.test4();
t.test5();
t.test6();
t.test7();
t.test8();
t.testLoopPhi();
}

@Test
public void testInSubprocess() throws InterruptedException, IOException {
Assume.assumeTrue("LockingMode is supported after JDK22)", JavaVersionUtil.JAVA_SPEC >= 22);
launchSubprocess(this::testMonitor, "-XX:LockingMode=2");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
}

// @formatter:off
@SyncPort(from = "https://github.com/openjdk/jdk/blob/c5e72450966ad50d57a8d22e9d634bfcb319aee9/src/hotspot/share/opto/library_call.cpp#L2877-L2932",
@SyncPort(from = "https://github.com/openjdk/jdk/blob/be2b92bd8b43841cc2b9c22ed4fde29be30d47bb/src/hotspot/share/opto/library_call.cpp#L2876-L2931",
sha1 = "5c117a305e90a48f0a6fe86ace2c15942393c0ab")
// @formatter:on
private static void inlineNativeNotifyJvmtiFunctions(GraalHotSpotVMConfig config, GraphBuilderContext b, ResolvedJavaMethod targetMethod, ForeignCallDescriptor descriptor,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import jdk.graal.compiler.word.Word;

// @formatter:off
@SyncPort(from = "https://github.com/openjdk/jdk/blob/c5e72450966ad50d57a8d22e9d634bfcb319aee9/src/hotspot/share/opto/library_call.cpp#L4511-L4643",
@SyncPort(from = "https://github.com/openjdk/jdk/blob/be2b92bd8b43841cc2b9c22ed4fde29be30d47bb/src/hotspot/share/opto/library_call.cpp#L4510-L4642",
sha1 = "9776f1621d6e2daecd17acf0cd89039339b28a1d")
// @formatter:on
public class HotSpotHashCodeSnippets extends IdentityHashCodeSnippets {
Expand Down
Loading

0 comments on commit c6acdc3

Please sign in to comment.