speedup JNI primitive field accesses

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 5.0
    • Affects Version/s: 5.0
    • Component/s: hotspot
    • beta2
    • generic
    • generic

      Use the following logic to speedup JNI primitive field accesses:
      A _safepoint_counter is increment at the beginning and end of each
      safepoint, with an initial value of 0.
      // load _safepoint_counter into old_counter
      // IF old_counter is odd THEN
      // a safepoint is going on, return jni_GetXXXField
      // ELSE
      // load the primitive field value into result (speculatively)
      // load _safepoint_counter into new_counter
      // IF (old_counter == new_counter) THEN
      // no safepoint happens during the field access, return result
      // ELSE
      // a safepoint might have happened in-between, return jni_GetXXXField()
      // ENDIF
      // ENDIF

      GetObjectField requires local handle creation so the idea can't be applied
      directly.

            Assignee:
            Mingyao Yang (Inactive)
            Reporter:
            Mingyao Yang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: