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

JVMTI Spec: add GetSystemThreadID function

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 9
    • hotspot
    • generic
    • generic

      An agent attached dynamically needs a way to associate the jthread ID with a system thread ID.
      The system thread ID is platform-dependent and can be selected from multiple thread ID types.
      The agents that are defined with the command line options normally request the system thread ID of their choice at the ThreadStart event.

      A suggestion is to provide the system thread ID that the Hotspot VM stores as the OSThread.
      The long can be returned to work around the platform dependency:
        jvmtiError GetSystemThreadId(jvmtiEnv* env, jthread thread, long* tid);

      One option to consider is adding this function with the JVMTI extension mechanism.

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

              Created:
              Updated: