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

get rid of compatibility ThreadStart/ThreadEnd events for virtual threads

    XMLWordPrintable

Details

    • b22
    • generic
    • generic

    Description

      The compatible lifecycle ThreadStart/ThreadEnd events were to support legacy virtual thread unaware JVMTI agents which do not enable the can_support_virtual_threads capability. When this capability is enabled then the VirtualThreadStart/VirtualThreadEnd instead of the ThreadStart/ThreadEnd events are generated for virtual threads and can be managed (enabled/disabled) separately. If the the can_support_virtual_threads capability is disabled then the ThreadStart/ThreadEnd events are generated.
      This enhancement is to get rid of the compatible lifecycle ThreadStart/ThreadEnd events.
      Motivation: Performance overhead from compatible lifecycle events can be significant when a lot of virtual threads are created.

      Also, there is an experimental VM flag PostVirtualThreadCompatibleLifecycleEvents (enabled bu default).
      If it is turned on then the default compatible lifecycle ThreadStart/ThreadEnd events for virtual threads are generated.
      This VM flag has to be removed now.

      Attachments

        Issue Links

          Activity

            People

              sspitsyn Serguei Spitsyn
              sspitsyn Serguei Spitsyn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: