RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

Alan Bateman alanb at openjdk.java.net
Tue May 3 08:11:47 UTC 2022


On Mon, 2 May 2022 17:29:02 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> test/hotspot/jtreg/serviceability/jvmti/events/Breakpoint/breakpoint01/libbreakpoint01.cpp line 139:
>> 
>>> 137:            thr_info.name,        (jni->IsVirtualThread(thread) == JNI_TRUE) ? "virtual" : "kernel",
>>> 138:         (thr_info.is_daemon == JNI_TRUE) ? "deamon" : "user");
>>> 139:   }
>> 
>> I'd suggest to add locals (their names are up to you):
>>    const char* thr_virtual_tag = jni->IsVirtualThread(thread) == JNI_TRUE ? "virtual" : "kernel";
>>    const char* thr_daemon_tag == JNI_TRUE) ? "deamon" : "user";
>> 
>> It is better to place togeter lines: 129+130.
>> Line 137 is not aligned, and there are many unneeded spaces.
>> The '()' around conditions are not needed. At least, I do not see them increasing readability.
>
> fixed

Thanks, I'll mark all the comments related to the JVMTI event tests as resolved.

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

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


More information about the serviceability-dev mailing list