RFR: 8367754: G1: Add a fast path in heap resize related method [v3]

Guanqiang Han ghan at openjdk.org
Fri Sep 19 12:48:38 UTC 2025


On Thu, 18 Sep 2025 13:16:04 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update TestHeapResizeAfterGC.java
>>   
>>   correct format error
>
>> ... thereby avoiding unnecessary computation
> 
> That's absolutely true; however, the real expensive part is not the calculation but actual resizing (commit/uncommit).
> 
> Since the existing logic is not simplified by the use of early-return, I feel it hinders readability slightly. I wonder what others think.

Hi @albertnetymk @tschatzl 
Thank you for your feedback!
I agree the benefit of this change might indeed be small.
I’ll take another look to see if there are other areas where it can help performance.
If not, I’ll go ahead and close this change.

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

PR Comment: https://git.openjdk.org/jdk/pull/27349#issuecomment-3312066625


More information about the hotspot-gc-dev mailing list