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

FastJNIAccessors: Check for JVMTI field access event requests at runtime

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08

      Description

      The current implementation of FastJNIAccessors ignores the flag -XX:+UseFastJNIAccessors when the JVMTI capability "can_post_field_access" is enabled.
      This is an unnecessary restriction which makes field accesses (Get<Type>Field) from native code slower when a JVMTI agent is attached which enables this capability.
      A better implementation would check at runtime if an agent actually wants to receive field access events.

      Note that the bytecode interpreter already uses this better implementation by checking if field access watch events were requested (JvmtiExport::_field_access_count != 0).

        Attachments

          Activity

            People

            Assignee:
            mdoerr Martin Doerr
            Reporter:
            mdoerr Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: