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

Albert Mingkun Yang ayang at openjdk.org
Fri May 17 08:17:03 UTC 2024


On Fri, 17 May 2024 08:04:10 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>>> the new address seems to should be destination + `<live words>`
>> 
>> Isn't that `new_addr = destination + live_words`?
>> 
>> (Not super clear what you are suggesting; can you post some code snippet here or point me to your repo/branch with your suggestion so that I can see the exact code?)
>
>> > 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?

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

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


More information about the hotspot-gc-dev mailing list