RFR: 8265932: Move safepoint related fields from class Thread to JavaThread
David Holmes
dholmes at openjdk.java.net
Tue Apr 27 00:48:33 UTC 2021
On Mon, 26 Apr 2021 15:01:41 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> Hi,
>
> Please review the following change. A left over from 8265453 was moving _poll_data from class Thread to JavaThread. There are also other fields like _no_safepoint_count and _visited_for_critical_count that should be moved.
> Tested in mach5 tiers 1-5. Tested it builds ppc, arm and s390. Tested it builds in release, optimized and fastdebug modes.
>
> Thanks,
> Patricio
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?
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3695
More information about the hotspot-runtime-dev
mailing list