RFR: 8329203: Parallel: Investigate Mark-Compact for Full GC to decrease memory usage [v4]

Guoxiong Li gli at openjdk.org
Tue May 21 12:36:07 UTC 2024


On Fri, 17 May 2024 08:14:54 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>>> > the new address seems to should be destination + `<live words>`
>>> 
>>> Isn't that `new_addr = destination + live_words`?
>> 
>> 
>> size_t live_words = region_ptr->partial_obj_size();
>> 
>> 
>> But the variable `live_words` is initialized as `partial_obj_size` (shown above). If the `partial_obj_size` is not zero, the code `new_addr = destination + live_words` actually equals to `new_addr = destination + <the actual live words> + <partial_obj_size>`. Is this your intention?
>
> `partial_obj_size` is non-zero iff those words belongs to a live obj. If you change to `size_t live_words = 0;`, wouldn't you get a test-failure?

I know what I missed now. The method  `RegionData::data_size`, used by `ParallelCompactData::summarize`, includes the `partial_obj_size` and `live_obj_size`. Then the `destination` is a precise location of a region (split by the the region border instead of the object border)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19101#discussion_r1608245994


More information about the hotspot-gc-dev mailing list