Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303242

ThreadMXBean issues with virtual threads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 19, 21
    • core-svc

      ThreadMXBean is specified to provide a monitoring or management interface for platform threads, it is specified to not support virtual threads.

      At this time, ThreadMXBean::isCurrentThreadCpuTimeSupported returns true when invoked from a virtual thread, it should return false.

      Additionally, when using the alternative implementation of virtual threads (-XX:-VMContinuations), there are a few issues:

      - getThreadXXXTime returns cpu/user time for virtual threads, it should set the elements corresponding to virtual threads to 1L.

      - getThreadAllocatedBytes returns the allocation by virtual threads, it should set the elements corresponding to virtual threads to 1L.

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: