RFR: 8332259: JvmtiTrace::safe_get_thread_name fails if current thread is in native state [v5]

David Holmes dholmes at openjdk.org
Thu May 30 06:06:09 UTC 2024


On Wed, 29 May 2024 01:18:57 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - fixed space.
>>  - The result is updated.
>
> src/hotspot/share/prims/jvmtiTrace.cpp line 284:
> 
>> 282:     JavaThreadState current_state = JavaThread::cast(Thread::current())->thread_state();
>> 283:     if (current_state == _thread_in_native || current_state == _thread_blocked) {
>> 284:       return "not readable";
> 
> Nit: I'd suggest to make it more detailed, something like like this:
>  "<non-readable thread name>" or "<NON-READABLE-THREAD-NAME>"

Yes this would have looked better if the text was more clearly an error message with angle brackets.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19275#discussion_r1619989123


More information about the serviceability-dev mailing list