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

Experimentally add back barrier-less Java thread transitions

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • b15

    Description

      In some extreme workloads where JNI is used for calling a very, very short function very, very often, there is a very small performance benefit from using the unsupported JNI critical.

      JNI critical does not properly leave the VM when going to native (which can block for safepoints) and gives access to the heap directly in case of a primitive array.

      JNI critical has been removed.

      The primitive array case seems not be well known (good!) and we have not seen any concerns about that.
      But the lack of faster JNI calls has been noted.

      If we only need the faster transitions the best idea for it is to add back barrier-less transitions. It is almost as fast as JNI critical, but applies to all ordinary JNI methods. (JNI critical had simpler argument packing due to blocking safepoints)

      This time we want to:
      - Use documented and supported OS features.
      - Leave it as an experimental feature, and document that it may be removed in any release without prior notice.

      Attachments

        Issue Links

          Activity

            People

              rehn Robbin Ehn
              rehn Robbin Ehn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: