Integrated: 8299414: JVMTI FollowReferences should support references from VirtualThread stack

Alex Menkov amenkov at openjdk.org
Wed May 24 20:31:15 UTC 2023


On Thu, 30 Mar 2023 22:58:12 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

> The fix updates JVMTI FollowReferences implementation to report references from virtual threads:
> - unmounted vthreads are detected, their stack references for JVMTI_HEAP_REFERENCE_STACK_LOCAL/JVMTI_HEAP_REFERENCE_JNI_LOCAL;
> - stacks of mounted vthreads are splitted into 2 parts (virtual thread stack and carrier thread stack), references are reported with correct thread id/class tag/object tags/frame depth;
> - common code to handle stack frames are moved into separate class;
> 
> Threads are reported as:
> - platform threads: JVMTI_HEAP_REFERENCE_THREAD (as before);
> - mounted vthreads (synthetic references, consider them as heap roots because carrier threads are roots): JVMTI_HEAP_REFERENCE_OTHER;
> - unmounted vthreads: not reported as heap roots.

This pull request has now been integrated.

Changeset: 207fbcb0
Author:    Alex Menkov <amenkov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/207fbcb08319c4cae976fc5248780d4b438ae5f9
Stats:     788 lines in 3 files changed: 679 ins; 80 del; 29 mod

8299414: JVMTI FollowReferences should support references from VirtualThread stack

Reviewed-by: sspitsyn, kevinw

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

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


More information about the hotspot-dev mailing list