RFR: 8371783: Refactor GCCause in VM_CollectForMetadataAllocation [v3]
Joel Sikström
jsikstro at openjdk.org
Fri Nov 21 13:47:30 UTC 2025
On Fri, 21 Nov 2025 09:58:59 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Hello,
>>
>> We should improve how we use and set GCCause in VM_CollectForMetadataAllocation to make it more clear when reading the code what is going on.
>>
>> When constructing a VM_CollectForMetadataAllocation operation, we pass in a GCCause, which is not always the cause that is used, since we might also have to clear soft references as a last resort if earlier collection attemps is not enough to free up memory.
>>
>> The GCCauseSetter at the start of this operation is also redundant as subsequent calls to initiate a GC set the cause themselves.
>>
>> Testing:
>> * Oracle's tier1-3
>
> Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8371783_refactor_vm_collectformetadataallocation
> - Move heap variable down a bit
> - 8371783: Refactor GCCause in VM_CollectForMetadataAllocation
Seems like Skara lost the issue...
Let's try this again. Thank you for the reviews!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28287#issuecomment-3563082294
PR Comment: https://git.openjdk.org/jdk/pull/28287#issuecomment-3563087513
More information about the hotspot-gc-dev
mailing list