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

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

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      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.


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

              Created:
              Updated:
              Resolved: