RFR: 8276824: refactor Thread::is_JavaThread_protected [v2]
David Holmes
dholmes at openjdk.java.net
Wed Nov 10 02:57:38 UTC 2021
On Tue, 9 Nov 2021 16:31:01 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Refactor `Thread::is_JavaThread_protected(const JavaThread* p, bool checkTLHOnly)`
>> into: `bool Thread::is_JavaThread_protected(const JavaThread* p)`
>> and: `Thread::is_JavaThread_protected_by_TLH(const JavaThread* p)`.
>> Also change callers that passed `checkTLHOnly == true` into calls to
>> `Thread::is_JavaThread_protected_by_TLH(const JavaThread* p)`.
>>
>> This refactoring is being tested with Mach5 Tier[1-3] (in process).
>>
>> In the "Files changed" view, enable "Settings -> Hide whitespace" for an easier review.
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>
> clarify the target thread parameter.
Hi Dan,
I'm okay with the changes as-is but also would not object to passing the current thread to avoid manifesting it - we do that a lot in other parts of the VM.
One (multi-place) nit below.
Thanks,
David
src/hotspot/share/runtime/thread.cpp line 1764:
> 1762: //
> 1763: bool JavaThread::java_suspend() {
> 1764: guarantee(Thread::is_JavaThread_protected_by_TLH(/* target */ this),
Nit: there's no need to comment a single argument.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6315
More information about the hotspot-runtime-dev
mailing list