ThreadMXBean issues with virtual threads

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: 19, 21
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: