On Fri, 12 Feb 2021 23:37:40 GMT, Coleen Phillimore <[email protected]> wrote:
>> JavaThread::get_thread_name() also calls is_JavaThread_protected(). >> >> The "friend" is so that JvmtiTrace can call get_thread_name_string() >> and we can get rid of the JvmtiTrace version of the logic. I kept the >> "<NOT FILLED IN>" rather than figure out a way to call Thread::name() >> so we don't introduce the possibility of a compatibility issue for any >> code that might depend on that hand rolled string value... > > So Thread::is_JavaThread_protected() should be "protected" then, not public. > yes, I was suggesting adding a default last parameter like > JavaThread::get_thread_name(char* default = Thread::name()); > and pass "<NOT_FILLED_IN\>" from JVMTI. Then JVMTI doesn't have to be a > friend and have more visibility to the JavaThread class than it should have. Ahhh.... I think I finally understand what you mean... I'll look in the AM after I've had some coffee... :-) ------------- PR: https://git.openjdk.java.net/jdk/pull/2535
