RFR: 8342560: GenShen: Fix confusing method name [v3]
William Kemper
wkemper at openjdk.org
Fri Oct 18 16:55:45 UTC 2024
On Thu, 17 Oct 2024 21:44:55 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp line 394:
>>
>>> 392: }
>>> 393:
>>> 394: inline bool ShenandoahHeap::is_not_in_active_young_collection(oop obj) const {
>>
>> This sounds to me more like: `is_in_old_when_active_young()`.
>>
>> The "not" is the name makes the negative of its semantics suspect. Think of the sense of what one might believe if one identified the negation with `is_in_active_young_collection()` which I'd take to be `active_generation()->is_young() && is_in_young(obj)`, rather than the actual negation of the condition which would be: `!active_generation()->is_young() || !is_in_old(obj)`.
>
> Can we verify that the predicate is stable in the context of an arbitrary current caller?
Active generation only changes on a safepoint. However, generational membership may change during evacuation.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/517#discussion_r1806775585
More information about the shenandoah-dev
mailing list