RFR: JDK-8306696: Remove MetaspaceReclaimPolicy=aggressive and deprecate MetaspaceReclaimPolicy [v4]

David Holmes dholmes at openjdk.org
Thu Apr 27 11:19:24 UTC 2023


On Thu, 27 Apr 2023 07:58:52 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/runtime/arguments.cpp line 507:
>> 
>>> 505:   { "RequireSharedSpaces",          JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
>>> 506:   { "UseSharedSpaces",              JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
>>> 507:   { "MetaspaceReclaimPolicy",       JDK_Version::jdk(21), JDK_Version::undefined(), JDK_Version::undefined() },
>> 
>> What you have done isn't deprecation, it is obsoletion - the flag is accepted but completely ignored (which is fine by me for a diagnostic flag). The above should be changed accordingly, or else continue to parse the flag and check for a valid value.
>
> You are right.
> 
> I don't want to deprecate right now since the flag was made a diagnostic flag just recently. I will continue to parse the flag, but do we really still need to parse for valid values? The flag has no meaning anymore.

If the flag only has one valid value now then it is effectively obsolete, so you may as well mark it as such. Existing users of the flag will get a warning either way.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13597#discussion_r1178990284


More information about the hotspot-runtime-dev mailing list