RFR: 8265453: SafepointMechanism::should_process() should receive JavaThread*
David Holmes
dholmes at openjdk.java.net
Thu Apr 22 03:02:22 UTC 2021
On Wed, 21 Apr 2021 14:47:13 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> Hi,
>
> Please review this cleanup in class SafepointMechanism. Since method should_process() is only called by JavaThreads the check in local_poll() is redundant. It also makes the generated code for should_process() unnecessary long since we only need to check the poll bit. I only had to fix a couple of calls from the zero interpreter that where passing a Thread* instead of a JavaThread*.
> Tested tier1 in mach5 and that it builds zero.
>
> Thanks,
> Patricio
Hi Patricio,
LGTM2! :)
Thanks,
David
src/hotspot/cpu/zero/zeroInterpreter_zero.cpp line 554:
> 552:
> 553: int ZeroInterpreter::getter_entry(Method* method, intptr_t UNUSED, TRAPS) {
> 554: JavaThread* thread = THREAD->as_Java_thread();
This will be unnecessary after my TRAPS change but that is still a little ways off. :)
src/hotspot/share/runtime/safepointMechanism.inline.hpp line 67:
> 65: return local_poll_armed(thread->as_Java_thread());
> 66: } else {
> 67: // If the poll is on a non-java thread we can only check the global state.
I had wondered how this case could arise - good to see it gone.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3603
More information about the hotspot-runtime-dev
mailing list