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

Alan Bateman alanb at openjdk.org
Thu Apr 13 09:59:37 UTC 2023


On Wed, 12 Apr 2023 14:55:59 GMT, Alan Bateman <alanb at openjdk.org> wrote:

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

> @AlanBateman as virtual threads have already been defined to not be GC roots aka "heap roots" then it would seem the spec does need adjusting to say "platform threads".

Yes, I think both the sentence in both FollowReferences and IterateOverReachableObjects will need to be re-visited. It is GC specific but historically the JVMTI spec has tried to specify something. Changing it to say platform threads does not prevent an implementation from using the the thread stacks of all threads. Additionally, we might have re-examine the descriptions of both JVMTI_HEAP_REFERENCE_STACK_LOCAL and JVMTI_HEAP_REFERENCE_JNI_LOCAL in jvmtiHeapReferenceKind.

Doing the spec changes in a separate PR might be okay, I don't have any opinion on that.

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

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


More information about the serviceability-dev mailing list