RFR: 8299414: JVMTI FollowReferences should support references from VirtualThread stack [v7]
Alan Bateman
alanb at openjdk.org
Wed Apr 12 14:58:36 UTC 2023
On Wed, 12 Apr 2023 01:12:49 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> The fix updates JVMTI FollowReferences implementation to report references from virtual threads:
>> - unmounted vthreads are detected and reported as JVMTI_HEAP_REFERENCE_THREAD;
>> - stack references for unmounted VT are reported as 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;
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed indent in collect_vthread_stack_roots
In the spec for FollowReferences, it says that the heap roots include "references from thread stacks". There is a similar sentence in the deprecated IterateOverReachableObjects function. We should decide whether these sentences need to be changed to say "platform thread stacks".
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13254#issuecomment-1505423293
More information about the serviceability-dev
mailing list