On Thu, 30 Mar 2023 22:58:12 GMT, Alex Menkov <amen...@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;

test/hotspot/jtreg/serviceability/jvmti/vthread/FollowReferences/VThreadStackRefTest.java
 line 43:

> 41:  * mounted and unmounted virtual threads and reports correct thread id
> 42:  * (for mounted vthread it should be vthread id, and not carrier thread 
> id).
> 43:  * Additionally tests that references from platform threads aree reported 
> correctly

"aree" -> "are"

test/hotspot/jtreg/serviceability/jvmti/vthread/FollowReferences/VThreadStackRefTest.java
 line 93:

> 91:             createObjAndWait(VThreadMountedJNIReferenced.class);
> 92:             Reference.reachabilityFence(referenced);
> 93:         });

This code used to use a java loop to keep busy, but now it relies on a sleep 
loop in native code. Was the java loop problematic?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13254#discussion_r1158982377
PR Review Comment: https://git.openjdk.org/jdk/pull/13254#discussion_r1158995466

Reply via email to