Integrated: 8371783: Refactor GCCause in VM_CollectForMetadataAllocation
Joel Sikström
jsikstro at openjdk.org
Fri Nov 21 13:49:52 UTC 2025
On Thu, 13 Nov 2025 10:08:36 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
This pull request has now been integrated.
Changeset: d01e7d98
Author: Joel Sikström <jsikstro at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d01e7d9850a57dd8e4849e2b7db6eacb37605647
Stats: 15 lines in 3 files changed: 5 ins; 3 del; 7 mod
8371783: Refactor GCCause in VM_CollectForMetadataAllocation
Reviewed-by: kbarrett, ayang
-------------
PR: https://git.openjdk.org/jdk/pull/28287
More information about the hotspot-gc-dev
mailing list