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

Expand JVMTI callback notion of "internal threads"

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        The JVMTI spec says heap callback functions may be invoked on an internal thread or the thread which called the iteration function. This used to be implemented by requiring the current thread to be either a Java thread or the VM thread. JDK-6278106 expanded this to also allow ConcurrentGCThreads, to support CMS.

        In particular, this affected the Raw Monitor API. See also JDK-4921421 and JDK-4937789.

        In order to support parallelization of the processing of weak references in the VM (e.g. weak but not java.lang.ref.Reference), we want to be able to call JvmtiExport::weak_oops_do from GC worker threads. However, that function attempts to generate ObjectFree events for objects that are found to be dead. Since GC worker thread might not be is_ConcurrentGC_thread, attempting to generate those events can fail (with JVMTI_ERROR_UNATTACHED_THREAD). Adding such GC worker thread to the acceptable set should allow this new configuration to work.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kbarrett Kim Barrett
                Reporter:
                kbarrett Kim Barrett
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: