RFR: Better jdb support for vthreads. Improved jdb vthread testing support.
Chris Plummer
cjplummer at openjdk.java.net
Tue Mar 8 04:42:29 UTC 2022
On Tue, 8 Mar 2022 04:25:05 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java line 114:
>>
>>> 112: if (eventThread != null) {
>>> 113: // This is a vthread we haven't seen before, so add it to our list.
>>> 114: assert eventThread.isVirtual();
>>
>> It is not clear why a virtual thread is expected here.
>> At least, some comment would be nice to have.
>
> I looked at the jdb changes. They look good to me. I've posed one comment though.
Yeah, that got misplaced, probably when I shuffled around some code. I think it would be correct if it was moved below the `addThread()` call and was changed to:
` assert !(added && !eventThread.isVirtual());`
which is probably more easily read as:
` assert !added || eventThread.isVirtual());`
First I need to see if I can even get asserts enabled since that one should have been triggered.
-------------
PR: https://git.openjdk.java.net/loom/pull/97
More information about the loom-dev
mailing list