RFR: 8331721: Introduce CollectedHeap helper methods for any GC in progress [v3]
Aleksey Shipilev
shade at openjdk.org
Fri May 17 11:52:09 UTC 2024
On Tue, 7 May 2024 18:38:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Continuation of [JDK-8331573](https://bugs.openjdk.org/browse/JDK-8331573). So far we only have a way to test for STW GCs. We would need these more generic sensing methods for [JDK-8331572](https://bugs.openjdk.org/browse/JDK-8331572).
>>
>> This patch considers that there can be several concurrent GCs in progress. A notable example of that is Generational ZGC, where minor and major concurrent collections can run at the same time. For G1, concurrent mark can interleave with collection pauses. This is why we track the number of GCs in progress as atomic.
>>
>> Initially, I thought to use `is_gc_active` name freed up by [JDK-8331573](https://bugs.openjdk.org/browse/JDK-8331573), but then I thought better of it. My concern would be that some backports might be confused about what `is_gc_active` name really means, depending on whether JDK-8331573 and this PR is backported or not. To avoid this confusion, I chose `is_any_gc_active` name instead.
>>
>> This PR is somewhat open for bikeshedding about the names :)
>>
>> Additional testing:
>> - [x] Linux AArch64 server fastdebug, `hotspot_gc`
>> - [ ] Linux AArch64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Cleanup
JDK-8331572 took another turn, so we don't need this. Feel free to reopen if need arises.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19122#issuecomment-2117422979
More information about the hotspot-gc-dev
mailing list