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

Alex Menkov amenkov at openjdk.org
Thu May 4 20:55:30 UTC 2023


> The fix updates JVMTI FollowReferences implementation to report references from virtual threads:
> - unmounted vthreads are detected, their stack references for JVMTI_HEAP_REFERENCE_STACK_LOCAL/JVMTI_HEAP_REFERENCE_JNI_LOCAL;
> - stacks of mounted vthreads are splitted into 2 parts (virtual thread stack and carrier thread stack), references are reported with correct thread id/class tag/object tags/frame depth;
> - common code to handle stack frames are moved into separate class;
> 
> Threads are reported as:
> - platform threads: JVMTI_HEAP_REFERENCE_THREAD (as before);
> - mounted vthreads (synthetic references, consider them as heap roots because carrier threads are roots): JVMTI_HEAP_REFERENCE_OTHER;
> - unmounted vthreads: not reported as heap roots.

Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:

  jvmtiTagMap refactoring

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13254/files
  - new: https://git.openjdk.org/jdk/pull/13254/files/1e6ca207..930f0d0c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13254&range=10
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13254&range=09-10

  Stats: 37 lines in 1 file changed: 1 ins; 8 del; 28 mod
  Patch: https://git.openjdk.org/jdk/pull/13254.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13254/head:pull/13254

PR: https://git.openjdk.org/jdk/pull/13254


More information about the hotspot-dev mailing list