Summary
The flag AliasLevel
(HotSpot VM command line flag) is to be deprecated, since its values are broken or redundant since 2015.
Problem
The range for AliasLevel is [0-3] with the following option description:
"0 - for no aliasing, "
"1 - for oop/field/static/array split, "
"2 - for class split, "
"3 - for unique instances"
The default value is 3. Only values 2 and 3 are currently supported. The VM terminated with an error with AliasLevel's value 0 or 1. Value 2 is redundant because the same behavior can be triggered by setting -XX:-EliminateAllocations
.
Solution
AliasLevel's value 2 turns off split_unique_types
transformation in C2 JIT escape analysis. But split_unique_types
is also guarded by the EliminateAllocations
flag. So -XX:AliasLevel=2
can be replaced with -XX:-EliminateAllocations
.
- Deprecate AliasLevel in JDK 19.
- Obsolete it in JDK 20
- Expire it in JDK 21.
Users will now get the following message when running:
java -XX:AliasLevel=
Java HotSpot(TM) 64-Bit Server VM warning: Option AliasLevel was deprecated in version 19.0 and will likely be removed in a future release.
Specification
Deprecate the AliasLevel
option in JDK 19 and issue the above warning message when the option is used.
- csr of
-
JDK-8075816 Deprecate AliasLevel flag since it is broken
-
- Resolved
-