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

Control sending of JVMTI events with a new Thread::can_post_jvmti_events() property

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 12
    • hotspot
    • None

      While discussing solutions for "8213834: JVMTI ResourceExhausted should not be posted in CompilerThread" (see [1]) a more general way to express the ability of a Thread to be able to send JVMTI events was proposed.

      a new "virtual bool Thread::can_post_JVMTI_events();" property could, similar to can_call_java(), suppress all kinds of JVMTI events from certain threads.

      Open questions:

      Which events? For a few JVMTI events the JVMTI documentation already restricts handlers to "not use JNI functions and must not use JVM TI functions except those which specifically allow such use" (see e.g. ObjectFree at [2]). Should we take this into account and not suppress these events?

      Which Threads? Does the ability to send JVMTI events from threads have to be documented in the JVMTI spec? If yes, that needs to be done before this RFE is implemented.

      [1] http://mail.openjdk.java.net/pipermail/serviceability-dev/2018-November/025911.html
      [2] https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#ObjectFree

            Unassigned Unassigned
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: