• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Loom
  4. Debugger Support

Page History

Versions Compared

Old Version 47

changes.mady.by.user Chris Plummer

Saved on Jul 06, 2022

compared with

New Version 48

changes.mady.by.user Alan Bateman

Saved on Jul 07, 2022

  • Previous Change: Difference between versions 46 and 47
  • Next Change: Difference between versions 48 and 49
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JDI VirtualThreads.allThreads() (and JDWP VirtualMachine/AllThreads) enumerates all active live platform threads, virtual threads are not enumerated unless the JDWP agent is started with the includevirtualthreads option (see below).

For thread dumps and troubleshooting purposes the debugger can invoke the com.sun.management.ThreadsHotSpotDiagnosticMXBean.dumpThreads API in the target VM to enumerate threadsgenerate a thread dump. This can be used as stop-gap solution until there is better support in the debugging in the APIs for finding virtual threads in the debugger APIs.

Thread groups

Virtual threads are not active members of a thread group. 

JDI ThreadGroupReference::threads (and JDWP ThreadGroupReference/Children) enumerate all active live platform threads in a group, virtual threads are not enumerated.

...

The recommend way is to check if the target VM is version 19 or later. There is no way to determine if --enable-preview was set, but this is also unnecessary. The JDK 19 debug agent will still accept execute commands that are virtual thread specific, even if the JVM was not run with --enable-preview.

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 172, "requestCorrelationId": "4225981c3630b9b9"}