RFR 8017061: os_bsd.cpp contains code for UseSHM and UseHugeTLBFS

David Holmes david.holmes at oracle.com
Fri Oct 19 01:24:26 UTC 2018

On 18/10/2018 11:35 PM, Gerard Ziemski wrote:
>> On Oct 17, 2018, at 8:38 PM, David Holmes <david.holmes at oracle.com> wrote:
>> Hi Gerard,
>> On 18/10/2018 3:14 AM, Gerard Ziemski wrote:
>>> Thank you for your reviews.
>>>> On Oct 16, 2018, at 6:52 PM, David Holmes <david.holmes at oracle.com> wrote:
>>>> Hi Gerard,
>>>> On 17/10/2018 2:04 AM, Gerard Ziemski wrote:
>>>>> hi David,
>>>>> Thank you for the review.
>>>>>> On Oct 16, 2018, at 1:48 AM, David Holmes <david.holmes at oracle.com> wrote:
>>>>>> Hi Gerard,
>>>>>> On 16/10/2018 5:41 AM, Gerard Ziemski wrote:
>>>>>>> Hi all,
>>>>>>> Please review this small fox that removes code from bsd platform, which implements unused (and untested) UseLargePages support.
>>>>>> Removal seems okay but I think you can also remove:
>>>>>> ./os/bsd/globals_bsd.hpp:  product(bool, UseSHM, false,
>>>>>> ./os/bsd/globals_bsd.hpp:  product(bool, UseHugeTLBFS, false,
>>>>> If I remove “UseSHM” and “UseHugeTLBFS” they will stop being accepted on BSD platform, though the documentation says it’s Linux only. Would I need to obsolete them? If so, how to obsolete a flag on just one platform?
>>>> I think if you #ifdef the entry in the obsolete flags table that would do it. This is a rare occurrence. Obsolete in 12 and expire in 13.
>>> Fixed.
>>> Webrev: http://cr.openjdk.java.net/~gziemski/8017061_rev2
>> The flags are obsoleted not deprecated, they should be removed from the globals_bsd.hpp file.
> If I remove them, then VM will no longer accept them and refuse to run. I though that the purpose of the deprecate/obsolete/expire exercise is to allow the VM to accept the flags in question, so developers have the time to adapt, and only remove them later?

You don't understand the deprecation/obsoletion/expiration process.

  - the code using the flag exists and works as normal
  - the flag continues to exist in globals.hpp (or variants)
  - the flag is listed as deprecated in the arguments.cpp table, for the 
current version, and may have future obsoletion and expiration versions
  - if the flag is used then a deprecation warning is issued

  - the code using the flag is completely removed (assuming the flags 
default value if appropriate)
  - the flag is removed from globals.hpp (or variants)
  - the table in arguments.cpp lists the flag as obsoleted in the 
current release
  - if the flag is used then an obsoletion warning is issued

  - the flag is removed from the table in arguments.cpp
  - if the flag is used the VM terminates with an "unknown VM option" error


> cheers

More information about the hotspot-runtime-dev mailing list