The can_support_virtual_thread was initially implemented as an onload 
capability.
It is why this capability does not work for the agents loaded into running VM.
The fix is to move it from `onload` to `always`capabilities list.

Testing:
New test is added: VirtualStartThreadTest.
TBD: mach5 jvmti, jdi and tier1-6 tests.

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

Commit messages:
 - simplified VirtualThreadStartTest
 - 8296323: JVMTI can_support_virtual_threads not available for agents loaded 
into running VM

Changes: https://git.openjdk.org/jdk/pull/11246/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11246&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296323
  Stats: 157 lines in 4 files changed: 153 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11246.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11246/head:pull/11246

PR: https://git.openjdk.org/jdk/pull/11246

Reply via email to