On Wed, 12 Apr 2023 14:55:59 GMT, Alan Bateman <al...@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

Reply via email to