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

FastJNIAccessors: Check for JVMTI field access event requests at runtime

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • None
    • hotspot
    • None
    • b08

      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).

            mdoerr Martin Doerr
            mdoerr Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: