RFR: 8241403: JavaThread::get_thread_name() should be ThreadSMR-aware [v2]

Coleen Phillimore coleenp at openjdk.java.net
Tue Feb 16 12:38:39 UTC 2021


On Sat, 13 Feb 2021 15:42:32 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> 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.

ok.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2535


More information about the serviceability-dev mailing list