RFR: 8241403: JavaThread::get_thread_name() should be ThreadSMR-aware
Coleen Phillimore
coleenp at openjdk.java.net
Sat Feb 13 15:30:40 UTC 2021
On Sat, 13 Feb 2021 15:13:44 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Ahhh.... I think I finally understand what you mean...
>> I'll look in the AM after I've had some coffee... :-)
>
> The name "default" is reserved so I went with "def_name".
> You can't call Thread::name() from the declaration:
> ./open/src/hotspot/share/runtime/thread.hpp:1690:62: error: call to non-static member function without an object argument
> const char* get_thread_name(const char* def_name = Thread::name()) const;
> ~~~~~~~~^~~~
> so I went with setting `def_name = NULL` in the declaration and decoding that state in get_thread_name():
> ` return (def_name != NULL) ? def_name : Thread::name();`
default_name, it's not long enough to abbreviate... but yes. thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/2535
More information about the serviceability-dev
mailing list