RFR(S): 8189666: Replace various inlined percentage calculations with global percent_of()

sangheon.kim sangheon.kim at oracle.com
Thu Oct 19 19:02:38 UTC 2017


Hi Thomas,

On 10/19/2017 10:13 AM, Thomas Schatzl wrote:
> Hi all,
>
>    could I have reviews for this change that replaces some ad-hoc
> percentage calculations by the global percent_of() method in gc code?
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8189666
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8189666/webrev/
Looks good as is.

These are minor nits so you can ignore.
1. Below lines also can be updated to use percent_of().
     1) threadLocalAllocBuffer.cpp:278
   double waste_percent = alloc == 0 ? 0.0 :
                                      100.0 * waste / alloc;

     2) threadLocalAllocBuffer.cpp:419
   double waste_percent = _total_allocation == 0 ? 0.0 :
                          100.0 * waste / _total_allocation;

2. Copyright needs to be updated for below files:
     - g1IHOPControl.cpp
     - g1StringDedupStat.cpp
     - g1StringDedupTable.cpp

Thanks,
Sangheon


> Testing:
> jprt
>
> Thanks,
>    Thomas
>




More information about the hotspot-gc-dev mailing list