Skip to content

Commit f2289d8

Browse files
committed
8381609: com/sun/jdi/EATests.java should not synchronize on an Integer instance
Reviewed-by: rrich, phubner, lmesnik, sspitsyn
1 parent f87bb76 commit f2289d8

1 file changed

Lines changed: 1 addition & 41 deletions

File tree

test/jdk/com/sun/jdi/EATests.java

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
23
* Copyright (c) 2020, 2025 SAP SE. All rights reserved.
34
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
45
*
@@ -80,20 +81,6 @@
8081
* -XX:-DoEscapeAnalysis -XX:-EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks
8182
* -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeObjectsALot
8283
*
83-
* @bug 8324881
84-
* @comment Regression test for using the wrong thread when logging during re-locking from deoptimization.
85-
*
86-
* @comment DiagnoseSyncOnValueBasedClasses=2 will cause logging when locking on \@ValueBased objects.
87-
* @run driver EATests
88-
* -XX:+UnlockDiagnosticVMOptions
89-
* -Xms256m -Xmx256m
90-
* -Xbootclasspath/a:.
91-
* -XX:CompileCommand=dontinline,*::dontinline_*
92-
* -XX:+WhiteBoxAPI
93-
* -Xbatch
94-
* -XX:+DoEscapeAnalysis -XX:+EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks
95-
* -XX:DiagnoseSyncOnValueBasedClasses=2
96-
*
9784
* @comment Re-lock may inflate monitors when re-locking, which cause monitorinflation trace logging.
9885
* @run driver EATests
9986
* -XX:+UnlockDiagnosticVMOptions
@@ -259,7 +246,6 @@ public static void main(String[] args) {
259246
new EAGetOwnedMonitorsTarget() .run();
260247
new EAEntryCountTarget() .run();
261248
new EARelockingObjectCurrentlyWaitingOnTarget() .run();
262-
new EARelockingValueBasedTarget() .run();
263249

264250
// Test cases that require deoptimization even though neither
265251
// locks nor allocations are eliminated at the point where
@@ -385,7 +371,6 @@ protected void runTests() throws Exception {
385371
new EAGetOwnedMonitors() .run(this);
386372
new EAEntryCount() .run(this);
387373
new EARelockingObjectCurrentlyWaitingOn() .run(this);
388-
new EARelockingValueBased() .run(this);
389374

390375
// Test cases that require deoptimization even though neither
391376
// locks nor allocations are eliminated at the point where
@@ -2402,31 +2387,6 @@ public void dontinline_waitWhenWarmupDone(ForLocking l2) throws Exception {
24022387
}
24032388

24042389

2405-
/////////////////////////////////////////////////////////////////////////////
2406-
2407-
/**
2408-
* Test relocking eliminated @ValueBased object.
2409-
*/
2410-
class EARelockingValueBased extends EATestCaseBaseDebugger {
2411-
2412-
public void runTestCase() throws Exception {
2413-
BreakpointEvent bpe = resumeTo(TARGET_TESTCASE_BASE_NAME, "dontinline_brkpt", "()V");
2414-
printStack(bpe.thread());
2415-
@SuppressWarnings("unused")
2416-
ObjectReference o = getLocalRef(bpe.thread().frame(1), Integer.class.getName(), "l1");
2417-
}
2418-
}
2419-
2420-
class EARelockingValueBasedTarget extends EATestCaseBaseTarget {
2421-
2422-
public void dontinline_testMethod() {
2423-
Integer l1 = new Integer(255);
2424-
synchronized (l1) {
2425-
dontinline_brkpt();
2426-
}
2427-
}
2428-
}
2429-
24302390
/////////////////////////////////////////////////////////////////////////////
24312391
//
24322392
// Test cases that require deoptimization even though neither locks

0 commit comments

Comments
 (0)