RFR: Better jdb support for vthreads. Improved jdb vthread testing support.

Chris Plummer cjplummer at openjdk.java.net
Tue Mar 8 05:30:11 UTC 2022


On Tue, 8 Mar 2022 04:38:51 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> 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.

Actually that's not quite right either. It looks like it needs to be:


            if (added) {
                assert eventThread.isVirtual();
            }

If this thread was added, it must be an a virtual thread, because if it was not it would have been previously added by a ThreadStart event.

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

PR: https://git.openjdk.java.net/loom/pull/97


More information about the loom-dev mailing list