Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/jdk/ProblemList-enable-preview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
#############################################################################

# Valhalla failures start here:
com/sun/jdi/EATests.java#id0 8372831 generic-all
35 changes: 23 additions & 12 deletions test/jdk/com/sun/jdi/EATests.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2025 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -28,38 +29,39 @@
* @summary Collection of test cases that check if optimizations based on escape analysis are reverted just before non-escaping objects escape through JVMTI.
* @author Richard Reingruber richard DOT reingruber AT sap DOT com
*
* @modules java.base/jdk.internal.misc
* @requires ((vm.compMode == "Xmixed") & vm.compiler2.enabled)
* @library /test/lib /test/hotspot/jtreg
*
* @run build TestScaffold VMConnection TargetListener TargetAdapter jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run compile -g EATests.java
*
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
* -XX:CompileCommand=dontinline,*::dontinline_*
* -XX:+WhiteBoxAPI
* -Xbatch
* -XX:+DoEscapeAnalysis -XX:+EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
* -XX:CompileCommand=dontinline,*::dontinline_*
* -XX:+WhiteBoxAPI
* -Xbatch
* -XX:+DoEscapeAnalysis -XX:+EliminateAllocations -XX:-EliminateLocks -XX:+EliminateNestedLocks
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
* -XX:CompileCommand=dontinline,*::dontinline_*
* -XX:+WhiteBoxAPI
* -Xbatch
* -XX:+DoEscapeAnalysis -XX:-EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
Expand All @@ -70,7 +72,7 @@
*
* @comment Excercise -XX:+DeoptimizeObjectsALot. Mostly to prevent bit-rot because the option is meant to stress object deoptimization
* with non-synthetic workloads.
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
Expand All @@ -84,7 +86,7 @@
* @comment Regression test for using the wrong thread when logging during re-locking from deoptimization.
*
* @comment DiagnoseSyncOnValueBasedClasses=2 will cause logging when locking on \@ValueBased objects.
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
Expand All @@ -95,7 +97,7 @@
* -XX:DiagnoseSyncOnValueBasedClasses=2
*
* @comment Re-lock may inflate monitors when re-locking, which cause monitorinflation trace logging.
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
Expand All @@ -107,7 +109,7 @@
*
* @bug 8341819
* @comment Regression test for re-locking racing with deflation with fast locking.
* @run driver EATests
* @run main EATests
* -XX:+UnlockDiagnosticVMOptions
* -Xms256m -Xmx256m
* -Xbootclasspath/a:.
Expand Down Expand Up @@ -159,6 +161,8 @@
import java.util.Map;
import java.util.function.Function;

import jdk.internal.misc.PreviewFeatures;

import jdk.test.lib.Asserts;
import jdk.test.whitebox.WhiteBox;
import jdk.test.whitebox.gc.GC;
Expand Down Expand Up @@ -259,7 +263,8 @@ public static void main(String[] args) {
new EAGetOwnedMonitorsTarget() .run();
new EAEntryCountTarget() .run();
new EARelockingObjectCurrentlyWaitingOnTarget() .run();
new EARelockingValueBasedTarget() .run();
// Cannot run EARelockingValueBased with value types enabled.
if (!PreviewFeatures.isEnabled()) new EARelockingValueBasedTarget() .run();

// Test cases that require deoptimization even though neither
// locks nor allocations are eliminated at the point where
Expand Down Expand Up @@ -302,10 +307,15 @@ public class EATests extends TestScaffold {
}

public static void main(String[] args) throws Exception {
int extra_args = 1;
if (EATestCaseBaseShared.RUN_ONLY_TEST_CASE != null) {
extra_args++;
}
args = Arrays.copyOf(args, args.length + extra_args);
if (EATestCaseBaseShared.RUN_ONLY_TEST_CASE != null) {
args = Arrays.copyOf(args, args.length + 1);
args[args.length - 1] = "-D" + EATestCaseBaseShared.RUN_ONLY_TEST_CASE_PROPERTY + "=" + EATestCaseBaseShared.RUN_ONLY_TEST_CASE;
args[args.length - extra_args--] = "-D" + EATestCaseBaseShared.RUN_ONLY_TEST_CASE_PROPERTY + "=" + EATestCaseBaseShared.RUN_ONLY_TEST_CASE;
}
args[args.length - extra_args] = "--add-exports java.base/jdk.internal.misc=ALL-UNNAMED";
new EATests(args).startTests();
}

Expand Down Expand Up @@ -385,7 +395,8 @@ protected void runTests() throws Exception {
new EAGetOwnedMonitors() .run(this);
new EAEntryCount() .run(this);
new EARelockingObjectCurrentlyWaitingOn() .run(this);
new EARelockingValueBased() .run(this);
// Cannot run EARelockingValueBased with value types enabled.
if (!PreviewFeatures.isEnabled()) new EARelockingValueBased() .run(this);

// Test cases that require deoptimization even though neither
// locks nor allocations are eliminated at the point where
Expand Down