RFR: 8288497: add support for JavaThread::cannot_access_oops_safely() [v2]
Daniel D. Daugherty
dcubed at openjdk.org
Fri Jun 17 15:08:10 UTC 2022
On Fri, 17 Jun 2022 01:00:57 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> We can definitely rename, but naming is hard... :-)
>>
>> Those names you proposed are inversions of the current name and would
>> require that the logic of the function be inverted.
>>
>> The other names I came up before I settled on is_gc_barrier_detached():
>>
>>
>> can_no_longer_access_oops()
>> oops_are_no_longer_safe()
>> cannot_safely_access_oops()
>>
>>
>> The closest match between your proposed names and mine are:
>>
>> `can_access_oops_safely` and `cannot_safely_access_oops`
>>
>> Other opinions are welcome.
>
> I think the style guide for naming is to use positive names to avoid double negatives when you have to negate the function - so `is_safe_for_x` rather than `is_not_safe_for_x`. I like `thread->is_oop_safe()` - short and clear.
I do one more rename of the bug, the PR and the function name...
-------------
PR: https://git.openjdk.org/jdk19/pull/20
More information about the hotspot-runtime-dev
mailing list