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

[Performance] sun.misc.Unsafe.[put|get]* suffer from redundant memory barriers

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      A DESCRIPTION OF THE PROBLEM :
      jdk.internal.misc.Unsafe implements methods to read/write native memory in following fashion:
      @ForceInline
      public byte getByte(long address) {
           return getByte(null, address);
      }
      As can be seen, a null value is passed on the stack without a reason.
      To resolve this, the method should be defined as:
      @HotSpotIntrinsicCandidate
       public native byte getByte(long offset);

      The reason to resolve this is because the current implementation is slower than the older one in eg. Java 8.


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vlivanov Vladimir Ivanov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: