RFR: 8299414: JVMTI FollowReferences should support references from VirtualThread stack [v7]

David Holmes dholmes at openjdk.org
Thu Apr 13 07:25:42 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

I don't see how you can make a distinction between spec and implementation in this particular area - an object is either a GC root or it is not. If it is then that has implications for reachability as well as these traversal API's. Having two different notions of "root" will just lead to confusion.

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

PR Comment: https://git.openjdk.org/jdk/pull/13254#issuecomment-1506477528


More information about the serviceability-dev mailing list