RFR: 8265932: Move safepoint related fields from class Thread to JavaThread
patricio.chilano.mateo at oracle.com
patricio.chilano.mateo at oracle.com
Tue Apr 27 02:48:19 UTC 2021
Hi David,
Thanks for looking at this.
On 4/26/21 9:48 PM, David Holmes wrote:
> Hi Patricio,
>
> Changes looks good. I had to double-check a few JavaThread conversions actually appear in code that can only be executed by a JavaThread, but they seem okay.
>
> One comment below.
>
> Thanks,
> David
>
> src/hotspot/share/runtime/mutex.cpp line 423:
>
>> 421:
>> 422: // NSV implied with locking allow_vm_block or !safepoint_check locks.
>> 423: void Mutex::no_safepoint_verifier(Thread* thread, bool enable) {
> Wouldn't it have been simpler to add the is_Java_thread() check in here rather than "inlining" this at the call-sites?
Since the call can be replaced by just two lines I thought it was better
to inline it for readability purposes. I also didn't like the name
no_safepoint_verifier() too much since we are not really verifying
anything. The verification is done in check_possible_safepoint(). I now
see the same issue with NoSafepointVerifier (maybe it should be
NoSafepointMark). Anyways, I don't really have a strong opinion about it
so I can restore it if you think it's better with no_safepoint_verifier().
Thanks,
Patricio
> -------------
>
> Marked as reviewed by dholmes (Reviewer).
>
> PR: https://git.openjdk.java.net/jdk/pull/3695
More information about the hotspot-runtime-dev
mailing list