RFR: 8288497: add support for JavaThread::cannot_access_oops_safely() [v2]
Daniel D. Daugherty
dcubed at openjdk.org
Fri Jun 17 15:08:08 UTC 2022
On Wed, 15 Jun 2022 22:38:31 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> @pchilano - Thanks for the review!
>>
>> Since we've been having issues with oop usage after the GC barrier is detached
>> in several bugs, I was going for the more precise control of adding the new
>> TerminatedTypes value. There is quite a bit of code from:
>>
>> old L3600: `BarrierSet::barrier_set()->on_thread_detach(p);`
>>
>> to
>>
>> old L3623: `p->set_terminated(JavaThread::_thread_terminated);`
>>
>> so rather than have to reason about the code over and over again,
>> I would rather do these sanity checks with targeted code. To paraphrase
>> @robehn: Why do with code inspection what you can do with code?
>
> @dcubed-ojdk I must admit I'm also not a fan of adding this very specialized interim state into the thread termination states. I would have expected the barrier code itself to be able to detect when `on_thread_detach` had been called, instead of the `JavaThread` having to track that for itself.
@dholmes-ora, @robehn and @fisk - Thanks for the re-reviews!
I'm going to do the rename that @dholmes-ora suggested and then
retest again...
-------------
PR: https://git.openjdk.org/jdk19/pull/20
More information about the hotspot-runtime-dev
mailing list