RFR: 8368006: Parallel: Skip full regions in dense prefix during Full GC [v2]

Albert Mingkun Yang ayang at openjdk.org
Thu Sep 25 10:48:07 UTC 2025


On Wed, 24 Sep 2025 20:57:43 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:

>> Can you provide a snippet? I don't get what you are suggesting. Just fyi, `cur_addr += cur_region_ptr->partial_obj_size()` is needed to make sure `cur_addr` is live-obj-end.
>
> This snippet:
> https://github.com/openjdk/jdk/blob/20937445c8a56f905df542ebe159d53494b66670/src/hotspot/share/gc/parallel/psParallelCompact.cpp#L1720-L1737
> 
> and this:
> https://github.com/openjdk/jdk/blob/20937445c8a56f905df542ebe159d53494b66670/src/hotspot/share/gc/parallel/psParallelCompact.cpp#L1788-L1805
> 
> are almost identical, am I missing something?

I see; yes, they are (almost) identical. However, there is a `continue` in the middle, which makes it hard to extract them out to be a function and these operations are quite caller specific, so forcing them into a function can hinder the readability, IMO, i.e. requiring readers to read into the implementation to understand the flow.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27369#discussion_r2378639901


More information about the hotspot-gc-dev mailing list