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

Leonid Mesnik lmesnik at openjdk.org
Fri Apr 7 02:30:45 UTC 2023


On Fri, 7 Apr 2023 02:25:43 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> The fix updates JVMTI FollowReferences implementation to report references from virtual threads:
>> - added heap scanning to report unmounted vthreads;
>> - stacks of mounted vthreads are splitted into 2 parts (vittual thread stack and carrier thread stack), references are reported with correct thread id/class and 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:
> 
>   trailing spaces

Changes requested by lmesnik (Reviewer).

test/hotspot/jtreg/serviceability/jvmti/vthread/FollowReferences/libVThreadStackRefTest.cpp line 179:

> 177: }
> 178: 
> 179: static volatile bool timeToExit = false;

It is not enough to make variable volatile in c++. You need to make it atomic or use monitors to correctly synchronize.

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

PR Review: https://git.openjdk.org/jdk/pull/13254#pullrequestreview-1375759394
PR Review Comment: https://git.openjdk.org/jdk/pull/13254#discussion_r1160389940


More information about the serviceability-dev mailing list