RFR: 8299414: JVMTI FollowReferences should support references from VirtualThread stack [v7]
Alex Menkov
amenkov at openjdk.org
Wed Apr 12 20:19:36 UTC 2023
On Wed, 12 Apr 2023 14:55:59 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> 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".
IterateOverReachableObjects spec is stricter. It contains:
`Roots are always reported to the profiler before any object references are reported.`
That is the reason this fix fixes only FollowReferences (stack references for unmounted VTs are collected only when is_advanced_heap_walk() is true), because otherwise we'd have to find all stack references before visit the object, i.e. it requires full heap scan in the beginning.
I don't care much about deprecated IterateOverReachableObjects (it shouldn't' be used by modern agents), but I think change in the spec would allow to fix IterateOverReachableObjects as well
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13254#issuecomment-1505869437
More information about the serviceability-dev
mailing list