RFR: 8241403: JavaThread::get_thread_name() should be ThreadSMR-aware
Daniel D.Daugherty
dcubed at openjdk.java.net
Sat Feb 13 15:45:39 UTC 2021
On Sat, 13 Feb 2021 15:25:16 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> default_name, it's not long enough to abbreviate... but yes. thanks!
>
> And it looks like making is_JavaThread_protected() a protected function doesn't work either since `JavaThread::get_thread_name()` can't call it:
>
> ./open/src/hotspot/share/runtime/thread.cpp:2857:15: error: 'is_JavaThread_protected' is a protected member of 'Thread'
> if (thread->is_JavaThread_protected(this)) {
> ^
> ./open/src/hotspot/share/runtime/thread.cpp:488:14: note: can only access this member on an object of type 'JavaThread'
> bool Thread::is_JavaThread_protected(const JavaThread* p) {
> ^
> 1 error generated.
`JavaThread::get_thread_name()` is calling `is_JavaThread_protected()` on the calling Thread and NOT on the `this` JavaThread so `protected` doesn't work.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2535
More information about the hotspot-runtime-dev
mailing list