RFR (S): 8248322: G1: Refactor full collection sizing code

Ivan Walulya ivan.walulya at oracle.com
Wed Jul 8 08:45:32 UTC 2020


Looks good to me!

Minor comment.

+static size_t target_heap_capacity(size_t used_bytes, uintx free_ratio) {
+  const double free_percentage = (double) free_ratio / 100.0;
+  const double used_percentage = 1.0 - free_percentage;
Clearer if the above variable names are also prefixed with “desired_”. 


> On 26 Jun 2020, at 16:30, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> Hi all,
> 
>  can I have reviews for this small refactoring changes that moves some heap sizing policy related code into a the "right" place (into the heap sizing policy class), and refactors it a bit.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8248322
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8248322/webrev/
> Testing:
> tier1
> 
> Thanks,
>  Thomas
> 




More information about the hotspot-gc-dev mailing list