RFR: 8227106: InitiatingHeapOccupancyPercent is G1-specific but defined in shared

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Tue Jan 12 12:10:59 UTC 2021


On Tue, 12 Jan 2021 09:27:55 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this little fix of G1.
>> The command line option InitiatingHeapOccupancyPercent is G1-specific. But it is defined in shared/gc_globals.hpp rather than g1/g1_globals.hpp. This patch moves it to the proper location.
>> Thank you for taking the time to review.
>> 
>> Best Regards.
>
> Hi,
> 
>   first, apologies for the late reply and actually having this PR get automatically closed due to inactivity.
>   
> Unfortunately, simply moving the `InitiatingHeapOccupancyPercent` flag to the other file is not sufficient to complete this problem properly. The move to that file implies that the flag will not be available for VM builds without G1 any more, possibly breaking lots of existing deployments - and there are lots of them using that flag.
> Further, flags in that file should all have a `G1` prefix clearly indicating that this is a G1 specific flag.
> 
> So a proper path to this "simple" move would probably be:
> 
> 1) Deprecate `InitiatingHeapOccupancyPercent` so that people can still use it the next few releases. Basically add it at the proper location in `special_jvm_flags` (best grep it).
> 2) Create a new flag "G1InitiatingHeapOccupancyPercent" and alias the other to this one (and add code handling if both are specified etc).
> 3) Change the code including the tests to use the new flag.
> 4) Fix the documentation (which we would need to do as the documentation sources are not public)
> 
> These two steps require a CSR - I think a single one is sufficient renaming the flag.
> 
> 5) At some point in the future a few releases out, obsolete and another release ahead, remove the old flag.
> 
> (I will also add this information to the CR in JIRA)
> 
> Tbh it's lots of work for not a lot of gain and a certain degree of disruption for end users so it might not be worth it.
> However I will support you (with improved turnaround time) if you want to continue on that path, as in the end it's work that should be done.
> 
> Thanks,
>   Thomas

@tschatzl Thank you for your reply.

Maybe the designer want other GC to reuse `InitiatingHeapOccupancyPercent` in the future.
We should do more investigations about the possible useful situations before we restart this work.

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

PR: https://git.openjdk.java.net/jdk/pull/1217



More information about the hotspot-gc-dev mailing list