-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8359437: Make users and test suite not able to set LockingMode flag #25847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,8 @@ int LogMinObjAlignmentInBytes = -1; | |
// Oop encoding heap max | ||
uint64_t OopEncodingHeapMax = 0; | ||
|
||
int LockingMode = LM_LIGHTWEIGHT; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const ? |
||
|
||
// Something to help porters sleep at night | ||
|
||
#ifdef ASSERT | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1009,6 +1009,8 @@ enum LockingMode { | |
LM_LIGHTWEIGHT = 2 | ||
}; | ||
|
||
extern int LockingMode; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const ? |
||
|
||
//---------------------------------------------------------------------------------------------------- | ||
// Special constants for debugging | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,21 +33,6 @@ | |
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wondering why these LockingMode=0 test cases were not setting I also realized we can only test heavy monitors in tests where we explicitly control the monitor creation places and hence can call the WB method to force inflation. That obviously reduces the test coverage for that mode quite significantly - but perhaps that will be handled if in the future we implicitly reenable forced inflation and do away with the WB usage. |
||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=1 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=2 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
*/ | ||
|
@@ -63,21 +48,6 @@ | |
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=0 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=1 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -Xint | ||
* -XX:LockingMode=2 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
*/ | ||
|
@@ -94,21 +64,6 @@ | |
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=0 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=1 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=2 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
*/ | ||
|
@@ -125,21 +80,6 @@ | |
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=0 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=1 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:TieredStopAtLevel=1 | ||
* -XX:LockingMode=2 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
*/ | ||
|
@@ -156,21 +96,6 @@ | |
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:-EliminateNestedLocks | ||
* -XX:LockingMode=0 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:-EliminateNestedLocks | ||
* -XX:LockingMode=1 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:-EliminateNestedLocks | ||
* -XX:LockingMode=2 | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 1 | ||
*/ | ||
|
@@ -182,25 +107,10 @@ | |
* @summary Tests recursive locking in C2 in alternate A and B mode. | ||
* @library /testlibrary /test/lib | ||
* @build jdk.test.whitebox.WhiteBox | ||
* | ||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:LockingMode=0 | ||
* -XX:-EliminateNestedLocks | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:LockingMode=1 | ||
* -XX:-EliminateNestedLocks | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
* | ||
* @run main/othervm/timeout=240 -Xbootclasspath/a:. | ||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI | ||
* -XX:LockingMode=2 | ||
* -XX:-EliminateNestedLocks | ||
* -Xms256m -Xmx256m | ||
* TestRecursiveLocking 120 2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have prevented the locking mode from being set then surely we can never encounter this case?