Полный перечень intrinsic-функций в HotSpot в JDK 7, 8, 9 и 10

в 9:39, , рубрики: hotspot, intrinsic, java, jit, JIT-компилятор, Компиляторы, оптимизация, Программирование

Интринсик или intrinsic-функция — функция, которую JIT-компилятор может встроить вместо вызова Java- и JNI-кода с целью оптимизации. Важный вывод из этого — intrinsic-функции не доступны в режиме интерпретатора. По умолчанию в HotSpot используется два JIT-компилятора C1 и C2, таким образом, может быть доступна реализация intrinsic-функции для каждого из JIT-компиляторов. Различия в реализации intrinsic-функций для разных JIT-компиляторов обуславливаются различным внутренним представлением кода (intermediate representation — IR).

В HotSpot реализовано несколько сотен интринсиков (их количество растёт от релиза к релизу). Описание всех intrinsic-функций можно найти в исходниках OpenJDK в файле vmSymbols.hpp. Ниже приведены полные списки интринсиков для JDK 7 (vmSymbols.hpp), JDK 8 (vmSymbols.hpp), JDK 9 (vmSymbols.hpp) и JDK 10 (vmSymbols.hpp).

Описание приведено в следующем виде:

<название интринсика> <java-класс>.<заменяемый метод класса>

Intrinsic-функции в JDK 7

Intrinsic-функции в JDK 7

java.lang.Object

_hashCode                 java.lang.Object.hashCode()
_getClass                 java.lang.Object.getClass()
_clone                    java.lang.Object.clone()

_Object_init              java.lang.Object()

java.lang.Math

_dabs                     java.lang.Math.abs(double)
_dsin                     java.lang.Math.sin(double)
_dcos                     java.lang.Math.cos(double)
_dtan                     java.lang.Math.tan(double)
_datan2                   java.lang.Math.atan2(double, double)
_dsqrt                    java.lang.Math.sqrt(double)
_dlog                     java.lang.Math.log(double)
_dlog10                   java.lang.Math.log10(double)
_dpow                     java.lang.Math.pow(double, double)
_dexp                     java.lang.Math.exp(double)
_min                      java.lang.Math.min(int, int)
_max                      java.lang.Math.max(int, int)

Double, Float

_floatToRawIntBits        java.lang.Float.floatToRawIntBits(float)
_floatToIntBits           java.lang.Float.floatToIntBits(float)
_intBitsToFloat           java.lang.Float.intBitsToFloat(int)

_doubleToRawLongBits      java.lang.Double.doubleToRawLongBits(double)
_doubleToLongBits         java.lang.Double.doubleToLongBits(double)
_longBitsToDouble         java.lang.Double.longBitsToDouble(long)

Integer, Long, Character, Short

_numberOfLeadingZeros_i   java.lang.Integer.numberOfLeadingZeros(int)
_numberOfLeadingZeros_l   java.lang.Long.numberOfLeadingZeros(long)

_numberOfTrailingZeros_i  java.lang.Integer.numberOfTrailingZeros(int)
_numberOfTrailingZeros_l  java.lang.Long.numberOfTrailingZeros(long)

_bitCount_i               java.lang.Integer.bitCount(int)
_bitCount_l               java.lang.Long.bitCount(long)

_reverseBytes_i           java.lang.Integer.reverseBytes(int)
_reverseBytes_l           java.lang.Long.reverseBytes(long)
_reverseBytes_c           java.lang.Character.reverseBytes(char)
_reverseBytes_s           java.lang.Short.reverseBytes(short)

_Integer_toString         java.lang.Integer.toString(int)

java.lang.System

_identityHashCode         java.lang.System.identityHashCode(Object)
_currentTimeMillis        java.lang.System.currentTimeMillis()
_nanoTime                 java.lang.System.nanoTime()
_arraycopy                java.lang.System.arraycopy(Object, int, Object, int, int)

java.lang.Thread

_isInterrupted            java.lang.Thread.isInterrupted(boolean)
_currentThread            java.lang.Thread.currentThread()

java.lang.Class

_isAssignableFrom         java.lang.Class.isAssignableFrom(Class)
_isInstance               java.lang.Class.isInstance(Object)
_getModifiers             java.lang.Class.getModifiers()
_isInterface              java.lang.Class.isInterface()
_isArray                  java.lang.Class.isArray()
_isPrimitive              java.lang.Class.isPrimitive()
_getSuperclass            java.lang.Class.getSuperclass()
_getComponentType         java.lang.Class.getComponentType()

Reflection

_getClassAccessFlags      sun.reflect.Reflection.getClassAccessFlags(Class)
_getCallerClass           sun.reflect.Reflection.getCallerClass(int)

_getLength                java.lang.reflect.Array.getLength(Object)
_newArray                 java.lang.reflect.Array.newArray(Class, int)

_invoke                   java.lang.reflect.Method.invoke(Object, Object...)

java.util.Arrays

_copyOf                   java.util.Arrays.copyOf(Object[], int, Class)
_copyOfRange              java.util.Arrays.copyOfRange(Object[], int, int, Class)
_equalsC                  java.util.Arrays.equals(char[], char[])

java.lang.String

_compareTo                java.lang.String.compareTo(String)
_indexOf                  java.lang.String.indexOf(String)
_equals                   java.lang.String.equals(Object)

_String_String            java.lang.String(String)

java.nio.Buffer

_checkIndex               java.nio.Buffer.checkIndex(int)

java.lang.ref.Reference

_Reference_get            java.lang.ref.Reference.get()

Cryptography

_aescrypt_encryptBlock com.sun.crypto.provider.AESCrypt.encryptBlock(byte[], in, byte[], int)
_aescrypt_decryptBlock com.sun.crypto.provider.AESCrypt.decryptBlock(byte[], in, byte[], int)
_cipherBlockChaining_encryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.encrypt(byte[], int, int, byte[], int)
_cipherBlockChaining_decryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.decrypt(byte[], int, int, byte[], int)

sun.misc.Unsafe

_allocateInstance         sun.misc.Unsafe.allocateInstance(Class)
_copyMemory               sun.misc.Unsafe.copyMemory(Object, long, Object, long, long)
_park                     sun.misc.Unsafe.park(boolean, long)
_unpark                   sun.misc.Unsafe.unpark(Object)

_getObject                sun.misc.Unsafe.getObject(Object, long)
_getBoolean               sun.misc.Unsafe.getBoolean(Object, long)
_getByte                  sun.misc.Unsafe.getByte(Object, long)
_getShort                 sun.misc.Unsafe.getShort(Object, long)
_getChar                  sun.misc.Unsafe.getChar(Object, long)
_getInt                   sun.misc.Unsafe.getInt(Object, long)
_getLong                  sun.misc.Unsafe.getLong(Object, long)
_getFloat                 sun.misc.Unsafe.getFloat(Object, long)
_getDouble                sun.misc.Unsafe.getDouble(Object, long)

_putObject                sun.misc.Unsafe.putObject(Object, long, Object)
_putBoolean               sun.misc.Unsafe.putBoolean(Object, long, boolean)
_putByte                  sun.misc.Unsafe.putByte(Object, long, byte)
_putShort                 sun.misc.Unsafe.putShort(Object, long, short)
_putChar                  sun.misc.Unsafe.putChar(Object, long, char)
_putInt                   sun.misc.Unsafe.putInt(Object, long, int)
_putLong                  sun.misc.Unsafe.putLong(Object, long, long)
_putFloat                 sun.misc.Unsafe.putFloat(Object, long, float)
_putDouble                sun.misc.Unsafe.putDouble(Object, long, double)

_getObjectVolatile        sun.misc.Unsafe.getObjectVolatile(Object, long)
_getBooleanVolatile       sun.misc.Unsafe.getBooleanVolatile(Object, long)
_getByteVolatile          sun.misc.Unsafe.getByteVolatile(Object, long)
_getShortVolatile         sun.misc.Unsafe.getShortVolatile(Object, long)
_getCharVolatile          sun.misc.Unsafe.getCharVolatile(Object, long)
_getIntVolatile           sun.misc.Unsafe.getIntVolatile(Object, long)
_getLongVolatile          sun.misc.Unsafe.getLongVolatile(Object, long)
_getFloatVolatile         sun.misc.Unsafe.getFloatVolatile(Object, long)
_getDoubleVolatile        sun.misc.Unsafe.getDoubleVolatile(Object, long)

_putObjectVolatile        sun.misc.Unsafe.putObjectVolatile(Object, long, Object)
_putBooleanVolatile       sun.misc.Unsafe.putBooleanVolatile(Object, long, boolean)
_putByteVolatile          sun.misc.Unsafe.putByteVolatile(Object, long, byte)
_putShortVolatile         sun.misc.Unsafe.putShortVolatile(Object, long, short)
_putCharVolatile          sun.misc.Unsafe.putCharVolatile(Object, long, char)
_putIntVolatile           sun.misc.Unsafe.putIntVolatile(Object, long, int)
_putLongVolatile          sun.misc.Unsafe.putLongVolatile(Object, long, long)
_putFloatVolatile         sun.misc.Unsafe.putFloatVolatile(Object, long, float)
_putDoubleVolatile        sun.misc.Unsafe.putDoubleVolatile(Object, long, double)

_getByte_raw              sun.misc.Unsafe.getByte(long)
_getShort_raw             sun.misc.Unsafe.getShort(long)
_getChar_raw              sun.misc.Unsafe.getChar(long)
_getInt_raw               sun.misc.Unsafe.getInt(long)
_getLong_raw              sun.misc.Unsafe.getLong(long)
_getFloat_raw             sun.misc.Unsafe.getFloat(long)
_getDouble_raw            sun.misc.Unsafe.getDouble(long)
_getAddress_raw           sun.misc.Unsafe.getAddress(long)

_putByte_raw              sun.misc.Unsafe.putByte(long, byte)
_putShort_raw             sun.misc.Unsafe.putShort(long, short)
_putChar_raw              sun.misc.Unsafe.putChar(long, char)
_putInt_raw               sun.misc.Unsafe.putInt(long, int)
_putLong_raw              sun.misc.Unsafe.putLong(long, long)
_putFloat_raw             sun.misc.Unsafe.putFloat(long, float)
_putDouble_raw            sun.misc.Unsafe.putDouble(long, double)
_putAddress_raw           sun.misc.Unsafe.putAddress(long, long)

_compareAndSwapObject     sun.misc.Unsafe.compareAndSwapObject(Object, long, Object, Object)
_compareAndSwapLong       sun.misc.Unsafe.compareAndSwapLong(Object, long, long, long)
_compareAndSwapInt        sun.misc.Unsafe.compareAndSwapInt(Object, long, int, int)

_putOrderedObject         sun.misc.Unsafe.putOrderedObject(Object, long, Object)
_putOrderedLong           sun.misc.Unsafe.putOrderedLong(Object, long, long)
_putOrderedInt            sun.misc.Unsafe.putOrderedInt(Object, long, int)

_getAndAddInt             sun.misc.Unsafe.getAndAddInt(Object, long, int)
_getAndAddLong            sun.misc.Unsafe.getAndAddLong(Object, long, long)
_getAndSetInt             sun.misc.Unsafe.getAndSet(Object, long, int)
_getAndSetLong            sun.misc.Unsafe.getAndSet(Object, long, long)
_getAndSetObject          sun.misc.Unsafe.getAndSet(Object, long, Object)

_prefetchRead             sun.misc.Unsafe.prefetchRead(Object, long)
_prefetchWrite            sun.misc.Unsafe.prefetchWrite(Object, long)
_prefetchReadStatic       sun.misc.Unsafe.prefetchReadStatic(Object, long)
_prefetchWriteStatic      sun.misc.Unsafe.prefetchWriteStatic(Object, long)

lava.lang.Throwable

_fillInStackTrace         java.lang.Throwable.fillInStackTrace()

java.lang.StringBuilder

_StringBuilder_void          java.lang.StringBuilder()
_StringBuilder_int           java.lang.StringBuilder(int)
_StringBuilder_String        java.lang.StringBuilder(String)

_StringBuilder_append_char   java.lang.StringBuilder.append(char)
_StringBuilder_append_int    java.lang.StringBuilder.append(int)
_StringBuilder_append_String java.lang.StringBuilder.append(String)

_StringBuilder_toString        java.lang.StringBuilder.toString()

java.lang.StringBuffer

_StringBuffer_void          java.lang.StringBuffer()
_StringBuffer_int           java.lang.StringBuffer(int)
_StringBuffer_String        java.lang.StringBuffer(String)

_StringBuffer_append_char   java.lang.StringBuffer.append(char)
_StringBuffer_append_int    java.lang.StringBuffer.append(int)
_StringBuffer_append_String java.lang.StringBuffer.append(String)

_StringBuffer_toString         java.lang.StringBuffer.toString()

java.lang.invoke.MethodHandle

_invokeGeneric            java.lang.invoke.MethodHandle.invoke*
_invokeBasic              java.lang.invoke.MethodHandle.invokeBasic*
_linkToVirtual            java.lang.invoke.MethodHandle.linkToVirtual*
_linkToStatic             java.lang.invoke.MethodHandle.linkToStatic*
_linkToSpecial            java.lang.invoke.MethodHandle.linkToSpecial*
_linkToInterface          java.lang.invoke.MethodHandle.linkToInterface*
_compiledLambdaForm       java.lang.invoke.MethodHandle.<compiledLambdaForm>*

Boxing и Unboxing

_booleanValue             java.lang.Boolean.booleanValue()
_byteValue                java.lang.Byte.byteValue()
_charValue                java.lang.Character.charValue()
_shortValue               java.lang.Short.shortValue()
_intValue                 java.lang.Integer.intValue()
_longValue                java.lang.Long.longValue()
_floatValue               java.lang.Float.floatValue()
_doubleValue              java.lang.Double.doubleValue()

_Boolean_valueOf          java.lang.Boolean.valueOf(boolean)
_Byte_valueOf             java.lang.Byte.valueOf(byte)
_Character_valueOf        java.lang.Character.valueOf(char)
_Short_valueOf            java.lang.Short.valueOf(short)
_Integer_valueOf          java.lang.Integer.valueOf(int)
_Long_valueOf             java.lang.Long.valueOf(long)
_Float_valueOf            java.lang.Float.valueOf(float)
_Double_valueOf           java.lang.Double.valueOf(double)

Intrinsic-функции в JDK 8

Intrinsic-функции в JDK 8

java.lang.Object

_hashCode                 java.lang.Object.hashCode()
_getClass                 java.lang.Object.getClass()
_clone                    java.lang.Object.clone()

_Object_init              java.lang.Object()

java.lang.Math

_dabs                     java.lang.Math.abs(double)
_dsin                     java.lang.Math.sin(double)
_dcos                     java.lang.Math.cos(double)
_dtan                     java.lang.Math.tan(double)
_datan2                   java.lang.Math.atan2(double, double)
_dsqrt                    java.lang.Math.sqrt(double)
_dlog                     java.lang.Math.log(double)
_dlog10                   java.lang.Math.log10(double)
_dpow                     java.lang.Math.pow(double, double)
_dexp                     java.lang.Math.exp(double)
_min                      java.lang.Math.min(int, int)
_max                      java.lang.Math.max(int, int)

_addExactI                java.lang.Math.addExact(int, int)
_addExactL                java.lang.Math.addExact(long, long)
_decrementExactI          java.lang.Math.decrementExact(int)
_decrementExactL          java.lang.Math.decrementExact(long)
_incrementExactI          java.lang.Math.incrementExact(int)
_incrementExactL          java.lang.Math.incrementExact(long)
_multiplyExactI           java.lang.Math.multiplyExact(int, int)
_multiplyExactL           java.lang.Math.multiplyExact(long, long)
_negateExactI             java.lang.Math.negateExact(int)
_negateExactL             java.lang.Math.negateExact(long)
_subtractExactI           java.lang.Math.subtractExact(int, int)
_subtractExactL           java.lang.Math.subtractExact(long, long)

В JDK 8 в класс java.lang.Math были добавлены новые методы и для них соответствующие intrinsic-функции.

Double, Float

_floatToRawIntBits        java.lang.Float.floatToRawIntBits(float)
_floatToIntBits           java.lang.Float.floatToIntBits(float)
_intBitsToFloat           java.lang.Float.intBitsToFloat(int)

_doubleToRawLongBits      java.lang.Double.doubleToRawLongBits(double)
_doubleToLongBits         java.lang.Double.doubleToLongBits(double)
_longBitsToDouble         java.lang.Double.longBitsToDouble(long)

Integer, Long, Character, Short

_numberOfLeadingZeros_i   java.lang.Integer.numberOfLeadingZeros(int)
_numberOfLeadingZeros_l   java.lang.Long.numberOfLeadingZeros(long)

_numberOfTrailingZeros_i  java.lang.Integer.numberOfTrailingZeros(int)
_numberOfTrailingZeros_l  java.lang.Long.numberOfTrailingZeros(long)

_bitCount_i               java.lang.Integer.bitCount(int)
_bitCount_l               java.lang.Long.bitCount(long)

_reverseBytes_i           java.lang.Integer.reverseBytes(int)
_reverseBytes_l           java.lang.Long.reverseBytes(long)
_reverseBytes_c           java.lang.Character.reverseBytes(char)
_reverseBytes_s           java.lang.Short.reverseBytes(short)

_Integer_toString         java.lang.Integer.toString(int)

java.lang.System

_identityHashCode         java.lang.System.identityHashCode(Object)
_currentTimeMillis        java.lang.System.currentTimeMillis()
_nanoTime                 java.lang.System.nanoTime()
_arraycopy                java.lang.System.arraycopy(Object, int, Object, int, int)

java.lang.Thread

_isInterrupted            java.lang.Thread.isInterrupted(boolean)
_currentThread            java.lang.Thread.currentThread()

java.lang.Class

_isAssignableFrom         java.lang.Class.isAssignableFrom(Class)
_isInstance               java.lang.Class.isInstance(Object)
_getModifiers             java.lang.Class.getModifiers()
_isInterface              java.lang.Class.isInterface()
_isArray                  java.lang.Class.isArray()
_isPrimitive              java.lang.Class.isPrimitive()
_getSuperclass            java.lang.Class.getSuperclass()
_getComponentType         java.lang.Class.getComponentType()

Reflection

_getClassAccessFlags      sun.reflect.Reflection.getClassAccessFlags(Class)
_getCallerClass           sun.reflect.Reflection.getCallerClass()

_getLength                java.lang.reflect.Array.getLength(Object)
_newArray                 java.lang.reflect.Array.newArray(Class, int)

_invoke                   java.lang.reflect.Method.invoke(Object, Object...)

В JDK 8 метод sun.reflect.reflection.getCallerClass(int) помечен как @Deprecated, вмеcто него используется метод sun.reflect.Reflection.getCallerClass().

java.util.Arrays

_copyOf                   java.util.Arrays.copyOf(Object[], int, Class)
_copyOfRange              java.util.Arrays.copyOfRange(Object[], int, int, Class)
_equalsC                  java.util.Arrays.equals(char[], char[])

java.lang.String

_compareTo                java.lang.String.compareTo(String)
_indexOf                  java.lang.String.indexOf(String)
_equals                   java.lang.String.equals(Object)

_String_String            java.lang.String(String)

java.nio.Buffer

_checkIndex               java.nio.Buffer.checkIndex(int)

sun.nio.cs.ISO_8859_1$Encoder

_encodeISOArray     sun.nio.cs.ISO_8859_1.Encoder.encodeISOArray(char[], int, byte[], int, int)

В класс sun.nio.cs.ISO_8859_1$Encoder был добавлен новый метод encodeISOArray.

java.math.BigInteger

_multiplyToLen       java.math.BigInteger.multiplyToLen(int[], int, int[], int, int[])
_squareToLen         java.math.BigInteger.squareToLen(int[], int, int[], int)
_mulAdd              java.math.BigInteger.mulAdd(int[], int[], int, int, int)
_montgomeryMultiply  java.math.BigInteger.montgomeryMultiply(int[], int[], int[], int, long, int[])
_montgomerySquare    java.math.BigInteger.montgomerySquare(int[], int[], int, long, int[])

Для нескольких методов java.math.BigInteger в JDK 8 появились свои интринсики.

java.lang.ref.Reference

_Reference_get            java.lang.ref.Reference.get()

Cryptography

_aescrypt_encryptBlock com.sun.crypto.provider.AESCrypt.encryptBlock(byte[], in, byte[], int)
_aescrypt_decryptBlock com.sun.crypto.provider.AESCrypt.decryptBlock(byte[], in, byte[], int)
_cipherBlockChaining_encryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.encrypt(byte[], int, int, byte[], int)
_cipherBlockChaining_decryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.decrypt(byte[], int, int, byte[], int)

sun.security.provider.*

_sha_implCompress sun.security.provider.SHA.implCompress(byte[], int)
_sha2_implCompress sun.security.provider.SHA2.implCompress(byte[], int)
_sha5_implCompress sun.security.provider.SHA5.implCompress(byte[], int)

_digestBase_implCompressMB sun.security.provider.Digestbase.implCompressMultiBlock(byte[], int, int)

Только в JDK 8 появились интринсики для implCompress(). Добавлен новый метод sun.security.provider.DigestBase.implCompressMultiBlock().

java.util.zip.CRC32

_updateCRC32               java.util.zip.CRC32.update(int, int)
_updateBytesCRC32          java.util.zip.CRC32.updateBytes(int, byte[], int, int)
_updateByteBufferCRC32     java.util.zip.CRC32.updateByteBuffer(int, long, int, int)

Два интринсика для ранее существовавших метода update и updateBytes. Метод updateByteBuffer появился только в JDK 8.

sun.misc.Unsafe

_allocateInstance         sun.misc.Unsafe.allocateInstance(Class)
_copyMemory               sun.misc.Unsafe.copyMemory(Object, long, Object, long, long)
_park                     sun.misc.Unsafe.park(boolean, long)
_unpark                   sun.misc.Unsafe.unpark(Object)

_loadFence                sun.misc.Unsafe.loadFence()
_storeFence               sun.misc.Unsafe.storeFence()
_fullFence                sun.misc.Unsafe.fullFence()

_getObject                sun.misc.Unsafe.getObject(Object, long)
_getBoolean               sun.misc.Unsafe.getBoolean(Object, long)
_getByte                  sun.misc.Unsafe.getByte(Object, long)
_getShort                 sun.misc.Unsafe.getShort(Object, long)
_getChar                  sun.misc.Unsafe.getChar(Object, long)
_getInt                   sun.misc.Unsafe.getInt(Object, long)
_getLong                  sun.misc.Unsafe.getLong(Object, long)
_getFloat                 sun.misc.Unsafe.getFloat(Object, long)
_getDouble                sun.misc.Unsafe.getDouble(Object, long)

_putObject                sun.misc.Unsafe.putObject(Object, long, Object)
_putBoolean               sun.misc.Unsafe.putBoolean(Object, long, boolean)
_putByte                  sun.misc.Unsafe.putByte(Object, long, byte)
_putShort                 sun.misc.Unsafe.putShort(Object, long, short)
_putChar                  sun.misc.Unsafe.putChar(Object, long, char)
_putInt                   sun.misc.Unsafe.putInt(Object, long, int)
_putLong                  sun.misc.Unsafe.putLong(Object, long, long)
_putFloat                 sun.misc.Unsafe.putFloat(Object, long, float)
_putDouble                sun.misc.Unsafe.putDouble(Object, long, double)

_getObjectVolatile        sun.misc.Unsafe.getObjectVolatile(Object, long)
_getBooleanVolatile       sun.misc.Unsafe.getBooleanVolatile(Object, long)
_getByteVolatile          sun.misc.Unsafe.getByteVolatile(Object, long)
_getShortVolatile         sun.misc.Unsafe.getShortVolatile(Object, long)
_getCharVolatile          sun.misc.Unsafe.getCharVolatile(Object, long)
_getIntVolatile           sun.misc.Unsafe.getIntVolatile(Object, long)
_getLongVolatile          sun.misc.Unsafe.getLongVolatile(Object, long)
_getFloatVolatile         sun.misc.Unsafe.getFloatVolatile(Object, long)
_getDoubleVolatile        sun.misc.Unsafe.getDoubleVolatile(Object, long)

_putObjectVolatile        sun.misc.Unsafe.putObjectVolatile(Object, long, Object)
_putBooleanVolatile       sun.misc.Unsafe.putBooleanVolatile(Object, long, boolean)
_putByteVolatile          sun.misc.Unsafe.putByteVolatile(Object, long, byte)
_putShortVolatile         sun.misc.Unsafe.putShortVolatile(Object, long, short)
_putCharVolatile          sun.misc.Unsafe.putCharVolatile(Object, long, char)
_putIntVolatile           sun.misc.Unsafe.putIntVolatile(Object, long, int)
_putLongVolatile          sun.misc.Unsafe.putLongVolatile(Object, long, long)
_putFloatVolatile         sun.misc.Unsafe.putFloatVolatile(Object, long, float)
_putDoubleVolatile        sun.misc.Unsafe.putDoubleVolatile(Object, long, double)

_getByte_raw              sun.misc.Unsafe.getByte(long)
_getShort_raw             sun.misc.Unsafe.getShort(long)
_getChar_raw              sun.misc.Unsafe.getChar(long)
_getInt_raw               sun.misc.Unsafe.getInt(long)
_getLong_raw              sun.misc.Unsafe.getLong(long)
_getFloat_raw             sun.misc.Unsafe.getFloat(long)
_getDouble_raw            sun.misc.Unsafe.getDouble(long)
_getAddress_raw           sun.misc.Unsafe.getAddress(long)

_putByte_raw              sun.misc.Unsafe.putByte(long, byte)
_putShort_raw             sun.misc.Unsafe.putShort(long, short)
_putChar_raw              sun.misc.Unsafe.putChar(long, char)
_putInt_raw               sun.misc.Unsafe.putInt(long, int)
_putLong_raw              sun.misc.Unsafe.putLong(long, long)
_putFloat_raw             sun.misc.Unsafe.putFloat(long, float)
_putDouble_raw            sun.misc.Unsafe.putDouble(long, double)
_putAddress_raw           sun.misc.Unsafe.putAddress(long, long)

_compareAndSwapObject     sun.misc.Unsafe.compareAndSwapObject(Object, long, Object, Object)
_compareAndSwapLong       sun.misc.Unsafe.compareAndSwapLong(Object, long, long, long)
_compareAndSwapInt        sun.misc.Unsafe.compareAndSwapInt(Object, long, int, int)

_putOrderedObject         sun.misc.Unsafe.putOrderedObject(Object, long, Object)
_putOrderedLong           sun.misc.Unsafe.putOrderedLong(Object, long, long)
_putOrderedInt            sun.misc.Unsafe.putOrderedInt(Object, long, int)

_getAndAddInt             sun.misc.Unsafe.getAndAddInt(Object, long, int)
_getAndAddLong            sun.misc.Unsafe.getAndAddLong(Object, long, long)
_getAndSetInt             sun.misc.Unsafe.getAndSet(Object, long, int)
_getAndSetLong            sun.misc.Unsafe.getAndSet(Object, long, long)
_getAndSetObject          sun.misc.Unsafe.getAndSet(Object, long, Object)

_prefetchRead             sun.misc.Unsafe.prefetchRead(Object, long)
_prefetchWrite            sun.misc.Unsafe.prefetchWrite(Object, long)
_prefetchReadStatic       sun.misc.Unsafe.prefetchReadStatic(Object, long)
_prefetchWriteStatic      sun.misc.Unsafe.prefetchWriteStatic(Object, long)

Три новых метода sun.misc.Unsafe.*fence() (memory barriers).

lava.lang.Throwable

_fillInStackTrace         java.lang.Throwable.fillInStackTrace()

java.lang.StringBuilder

_StringBuilder_void          java.lang.StringBuilder()
_StringBuilder_int           java.lang.StringBuilder(int)
_StringBuilder_String        java.lang.StringBuilder(String)

_StringBuilder_append_char   java.lang.StringBuilder.append(char)
_StringBuilder_append_int    java.lang.StringBuilder.append(int)
_StringBuilder_append_String java.lang.StringBuilder.append(String)

_StringBuilder_toString        java.lang.StringBuilder.toString()

java.lang.StringBuffer

_StringBuffer_void          java.lang.StringBuffer()
_StringBuffer_int           java.lang.StringBuffer(int)
_StringBuffer_String        java.lang.StringBuffer(String)

_StringBuffer_append_char   java.lang.StringBuffer.append(char)
_StringBuffer_append_int    java.lang.StringBuffer.append(int)
_StringBuffer_append_String java.lang.StringBuffer.append(String)

_StringBuffer_toString         java.lang.StringBuffer.toString()

java.lang.invoke.MethodHandle

_invokeGeneric            java.lang.invoke.MethodHandle.invoke*
_invokeBasic              java.lang.invoke.MethodHandle.invokeBasic*
_linkToVirtual            java.lang.invoke.MethodHandle.linkToVirtual*
_linkToStatic             java.lang.invoke.MethodHandle.linkToStatic*
_linkToSpecial            java.lang.invoke.MethodHandle.linkToSpecial*
_linkToInterface          java.lang.invoke.MethodHandle.linkToInterface*
_compiledLambdaForm       java.lang.invoke.MethodHandle.<compiledLambdaForm>*

_profileBoolean java.lang.invoke.MethodHandleImpl.profileBoolean(boolean, int[])

Новый метод java.lang.invoke.MethodHandleImpl.profileBoolean(). Комментарий разработчиков над этим методом: Intrinsified by C2. Counters are used during parsing to calculate branch frequencies..

Boxing и Unboxing

_booleanValue             java.lang.Boolean.booleanValue()
_byteValue                java.lang.Byte.byteValue()
_charValue                java.lang.Character.charValue()
_shortValue               java.lang.Short.shortValue()
_intValue                 java.lang.Integer.intValue()
_longValue                java.lang.Long.longValue()
_floatValue               java.lang.Float.floatValue()
_doubleValue              java.lang.Double.doubleValue()

_Boolean_valueOf          java.lang.Boolean.valueOf(boolean)
_Byte_valueOf             java.lang.Byte.valueOf(byte)
_Character_valueOf        java.lang.Character.valueOf(char)
_Short_valueOf            java.lang.Short.valueOf(short)
_Integer_valueOf          java.lang.Integer.valueOf(int)
_Long_valueOf             java.lang.Long.valueOf(long)
_Float_valueOf            java.lang.Float.valueOf(float)
_Double_valueOf           java.lang.Double.valueOf(double)

Intrinsic-функции в JDK 9

В JDK 9 была добавлена аннотация jdk.internal.HotSpotIntrinsicCandidate, которая символизирует, что вызов метода, помеченного @HotSpotIntrinsicCandidate, может быть заменен интринсиком. «Может» в данном контексте означает, что наличие intrinsic-функции для соответствующего метода не гарантирует, что JIT-компилятор будет использовать интринсик.

Добавлю, что заведён баг с предложением переименовать аннотацию в @IntrinsicCandidate и не плодить VM-специфичные сущности, как это было с sun.misc.

Intrinsic-функции в JDK 9

java.lang.Object

_hashCode                 java.lang.Object.hashCode()
_getClass                 java.lang.Object.getClass()
_clone                    java.lang.Object.clone()

_notify                   java.lang.Object.notify()
_notifyAll                java.lang.Object.notifyAll()

_Object_init              java.lang.Object()

В JDK 9 для Object добавили пару intrinsic-функций: _notify и _notifyAll.

java.lang.Math

_dabs                     java.lang.Math.abs(double)
_dsin                     java.lang.Math.sin(double)
_dcos                     java.lang.Math.cos(double)
_dtan                     java.lang.Math.tan(double)
_datan2                   java.lang.Math.atan2(double, double)
_dsqrt                    java.lang.Math.sqrt(double)
_dlog                     java.lang.Math.log(double)
_dlog10                   java.lang.Math.log10(double)
_dpow                     java.lang.Math.pow(double, double)
_dexp                     java.lang.Math.exp(double)
_min                      java.lang.Math.min(int, int)
_max                      java.lang.Math.max(int, int)

_addExactI                java.lang.Math.addExact(int, int)
_addExactL                java.lang.Math.addExact(long, long)
_decrementExactI          java.lang.Math.decrementExact(int)
_decrementExactL          java.lang.Math.decrementExact(long)
_incrementExactI          java.lang.Math.incrementExact(int)
_incrementExactL          java.lang.Math.incrementExact(long)
_multiplyExactI           java.lang.Math.multiplyExact(int, int)
_multiplyExactL           java.lang.Math.multiplyExact(long, long)
_negateExactI             java.lang.Math.negateExact(int)
_negateExactL             java.lang.Math.negateExact(long)
_subtractExactI           java.lang.Math.subtractExact(int, int)
_subtractExactL           java.lang.Math.subtractExact(long, long)

_fmaD                     java.lang.Math.fma(double, double, double)
_fmaF                     java.lang.Math.fma(float, float, float)

В JDK 9 в класс java.lang.Math добавили пару методов fma (~ a * b + c) и для них соответствующие intrinsic-функции.

Double, Float

_floatToRawIntBits        java.lang.Float.floatToRawIntBits(float)
_floatToIntBits           java.lang.Float.floatToIntBits(float)
_intBitsToFloat           java.lang.Float.intBitsToFloat(int)

_doubleToRawLongBits      java.lang.Double.doubleToRawLongBits(double)
_doubleToLongBits         java.lang.Double.doubleToLongBits(double)
_longBitsToDouble         java.lang.Double.longBitsToDouble(long)

Integer, Long, Character, Short

_numberOfLeadingZeros_i   java.lang.Integer.numberOfLeadingZeros(int)
_numberOfLeadingZeros_l   java.lang.Long.numberOfLeadingZeros(long)

_numberOfTrailingZeros_i  java.lang.Integer.numberOfTrailingZeros(int)
_numberOfTrailingZeros_l  java.lang.Long.numberOfTrailingZeros(long)

_bitCount_i               java.lang.Integer.bitCount(int)
_bitCount_l               java.lang.Long.bitCount(long)

_reverseBytes_i           java.lang.Integer.reverseBytes(int)
_reverseBytes_l           java.lang.Long.reverseBytes(long)
_reverseBytes_c           java.lang.Character.reverseBytes(char)
_reverseBytes_s           java.lang.Short.reverseBytes(short)

_Integer_toString         java.lang.Integer.toString(int)

java.lang.System

_identityHashCode         java.lang.System.identityHashCode(Object)
_currentTimeMillis        java.lang.System.currentTimeMillis()
_nanoTime                 java.lang.System.nanoTime()
_arraycopy                java.lang.System.arraycopy(Object, int, Object, int, int)

java.lang.Thread

_isInterrupted            java.lang.Thread.isInterrupted(boolean)
_currentThread            java.lang.Thread.currentThread()

_onSpinWait               java.lang.Thread.onSpinWait()

В JDK 9 появился новый метод onSpinWait — реализация busy waiting.

java.lang.Class

_isAssignableFrom         java.lang.Class.isAssignableFrom(Class)
_isInstance               java.lang.Class.isInstance(Object)
_getModifiers             java.lang.Class.getModifiers()
_isInterface              java.lang.Class.isInterface()
_isArray                  java.lang.Class.isArray()
_isPrimitive              java.lang.Class.isPrimitive()
_getSuperclass            java.lang.Class.getSuperclass()

_Class_cast               java.lang.Class.cast(Object)

Удалена intrinsic-функция для java.lang.Class.getComponentType() (getComponentType перестал быть native-методом).
В JDK 9 добавлен интринсик для метода cast.

Reflection

_getClassAccessFlags      sun.reflect.Reflection.getClassAccessFlags(Class)
_getCallerClass           sun.reflect.Reflection.getCallerClass()

_getLength                java.lang.reflect.Array.getLength(Object)
_newArray                 java.lang.reflect.Array.newArray(Class, int)

_invoke                   java.lang.reflect.Method.invoke(Object, Object...)

java.util.Arrays

_copyOf                   java.util.Arrays.copyOf(Object[], int, Class)
_copyOfRange              java.util.Arrays.copyOfRange(Object[], int, int, Class)
_equalsC                  java.util.Arrays.equals(char[], char[])

_equalsB                  java.util.Arrays.equals(boolean[], boolean[])

В JDK 9 добавлен intrinsic для java.util.Arrays.equals(boolean[], boolean[]).

StringUTF16 и StringLatin1

_compressStringC          java.lang.StringUTF16.compress(char[], int, byte[], int, int)
_compressStringB          java.lang.StringUTF16.compress(byte[], int, byte[], int, int)

_inflateStringC           java.lang.StringLatin1.inflate(byte[], int, char[], int, int)
_inflateStringB           java.lang.StringLatin1.inflate(byte[], int, byte[], int, int)

_toBytesStringU           java.lang.StringUTF16.toBytes(char[], int, int)
_getCharsStringU          java.lang.StringUTF16.getChars(byte[], int, int, char[], int)
_getCharStringU           java.lang.StringUTF16.getChar(byte[], int)
_putCharStringU           java.lang.StringUTF16.putChar(byte[] int, int)

_compareToL               java.lang.StringLatin1.compareTo(byte[], byte[])
_compareToU               java.lang.StringUTF16.compareTo(byte[], byte[])
_compareToLU              java.lang.StringLatin1.compareToUTF16(byte[], byte[])
_compareToUL              java.lang.StringUTF16.compareToLatin1(byte[], byte[])

_indexOfL                 java.lang.StringLatin1.indexOf(byte[], byte[])
_indexOfU                 java.lang.StringUTF16.indexOf(byte[], byte[])
_indexOfUL                java.lang.StringUTF16.indexOfLatin1(byte[], byte[])
_indexOfIL                java.lang.StringLatin1.indexOf(byte[], int, byte[], int, int)
_indexOfIU                java.lang.StringUTF16.indexOf(byte[], int, byte[], int, int)
_indexOfIUL               java.lang.StringUTF16.indexOfLatin1(byte[], int, byte[], int, int)
_indexOfU_char            java.lang.StringUTF16.indexOfChar(byte[], int, int, int)

_equalsL                  java.lang.StringLatin1.equals(byte[], byte[])
_equalsU                  java.lang.StringUTF16.equals(byte[], byte[])

В связи с изменениями в классе String в JDK 9 — JEP-254, появились два новых класса StringUTF16 и StringLatin1.

jdk.internal.util.Preconditions

_Preconditions_checkIndex jdk.internal.util.Preconditions.checkIndex(int, int, java.util.function.BiFunction)

Новый класс в JDK 9 с разными вспомогательными методами. Интринсик добавлен для метода проверки попадания значения в заданные границы.

java.lang.StringCoding

_hasNegatives             java.lang.StringCoding.hasNegatives(byte[], int, int)
_encodeByteISOArray       java.lang.StringCoding.encodeISOArray(byte[], int, byte[], int, int)

Ещё один новый класс в JDK 9.

java.lang.String

_String_String            java.lang.String(String)

Удалены прочие intrinsic-функции (_compareTo, _equals, _indexOf), т.к. реализация соответствующих методов перешла к классам StringUTF16 и StringLatin1. Подробнее об изменениях в классе String в JEP-254.

java.nio.Buffer

_checkIndex               java.nio.Buffer.checkIndex(int)

sun.nio.cs.ISO_8859_1$Encoder

_encodeISOArray     sun.nio.cs.ISO_8859_1.Encoder.encodeISOArray(char[], int, byte[], int, int)

В JDK 9 подвергся рефакторингу класс sun.nio.cs.ISO_8859_1$Encoder: был добавлен новый метод implEncodeISOArray, старый интринсик привязан к новому методу.

java.math.BigInteger

_multiplyToLen       java.math.BigInteger.multiplyToLen(int[], int, int[], int, int[])
_squareToLen         java.math.BigInteger.squareToLen(int[], int, int[], int)
_mulAdd              java.math.BigInteger.mulAdd(int[], int[], int, int, int)
_montgomeryMultiply  java.math.BigInteger.montgomeryMultiply(int[], int[], int[], int, long, int[])
_montgomerySquare    java.math.BigInteger.montgomerySquare(int[], int[], int, long, int[])

java.util.ArraysSupport

_vectorizedMismatch java.util.ArraysSupport.vectorizedMismatch(Object, long, Object, long, int, int)

Новый класс в JDK 9.

java.lang.ref.Reference

_Reference_get            java.lang.ref.Reference.get()

Cryptography

_aescrypt_encryptBlock com.sun.crypto.provider.AESCrypt.encryptBlock(byte[], in, byte[], int)
_aescrypt_decryptBlock com.sun.crypto.provider.AESCrypt.decryptBlock(byte[], in, byte[], int)
_cipherBlockChaining_encryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.encrypt(byte[], int, int, byte[], int)
_cipherBlockChaining_decryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.decrypt(byte[], int, int, byte[], int)

_counterMode_AESCrypt com.sun.crypto.provider.CounterMode.implCrypt(byte[], int, int, byte[], int)

_ghash_processBlocks com.sun.crypto.provider.GHASH.processBlocks(byte[], int, int, long[], long[])

В JDK 9 реализация метода CounterMode.crypt() вынесена в метод implCrypt с добавлением интринсика. Аналогичным образом отрефакторен GHASH.

sun.security.provider.*

_sha_implCompress sun.security.provider.SHA.implCompress(byte[], int)
_sha2_implCompress sun.security.provider.SHA2.implCompress(byte[], int)
_sha5_implCompress sun.security.provider.SHA5.implCompress(byte[], int)

_digestBase_implCompressMB sun.security.provider.DigestBase.implCompressMultiBlock0(byte[], int, int)

Рефакторинг DigestBase в JDK 9.

java.util.zip.CRC32 и java.util.zip.CRC32C

_updateCRC32               java.util.zip.CRC32.update(int2_int_signature)
_updateBytesCRC32          java.util.zip.CRC32.updateBytes0(updateBytes_signature)
_updateByteBufferCRC32     java.util.zip.CRC32.updateByteBuffer0(updateByteBuffer_signature)

_updateBytesCRC32C             java.util.zip.CRC32C.updateBytes(int, byte[], int, int)
_updateDirectByteBufferCRC32C  java.util.zip.CRC32C.updateDirectByteBuffer(int, long, int, int)

_updateBytesAdler32       java.util.zip.Adler32.updateBytes(int, byte[], int, int)
_updateByteBufferAdler32  java.util.zip.Adler32.updateByteBuffer(int, long, int, int)

Ещё код, подвергшийся рефакторингу в JDK 9.
Новый класс java.util.zip.CRC32C.

jdk.internal.misc.Unsafe

_allocateInstance         jdk.internal.misc.Unsafe.allocateInstance(Class)
_allocateUninitializedArray jdk.internal.misc.Unsafe.allocateUninitializedArray0(Class, int)
_copyMemory               jdk.internal.misc.Unsafe.copyMemory0(Object, long, Object, long, long)

_park                     jdk.internal.misc.Unsafe.park(boolean, long)
_unpark                   jdk.internal.misc.Unsafe.unpark(Object)

_loadFence                jdk.internal.misc.Unsafe.loadFence()
_storeFence                jdk.internal.misc.Unsafe.storeFence()
_fullFence                 jdk.internal.misc.Unsafe.fullFence()

_getObject                 jdk.internal.misc.Unsafe.getObject(Object, long)
_getBoolean                jdk.internal.misc.Unsafe.getBoolean(Object, long)
_getByte                   jdk.internal.misc.Unsafe.getByte(Object, long)
_getShort                  jdk.internal.misc.Unsafe.getShort(Object, long)
_getChar                   jdk.internal.misc.Unsafe.getChar(Object, long)
_getInt                    jdk.internal.misc.Unsafe.getInt(Object, long)
_getLong                   jdk.internal.misc.Unsafe.getLong(Object, long)
_getFloat                  jdk.internal.misc.Unsafe.getFloat(Object, long)
_getDouble                 jdk.internal.misc.Unsafe.getDouble(Object, long)

_putObject                 jdk.internal.misc.Unsafe.putObject(Object, long, Object)
_putBoolean                jdk.internal.misc.Unsafe.putBoolean(Object, long, boolean)
_putByte                   jdk.internal.misc.Unsafe.putByte(Object, long, byte)
_putShort                  jdk.internal.misc.Unsafe.putShort(Object, long, short)
_putChar                   jdk.internal.misc.Unsafe.putChar(Object, long, char)
_putInt                    jdk.internal.misc.Unsafe.putInt(Object, long, int)
_putLong                   jdk.internal.misc.Unsafe.putLong(Object, long, long)
_putFloat                  jdk.internal.misc.Unsafe.putFloat(Object, long, float)
_putDouble                 jdk.internal.misc.Unsafe.putDouble(Object, long, double)

_getObjectVolatile         jdk.internal.misc.Unsafe.getObjectVolatile(Object, long)
_getBooleanVolatile        jdk.internal.misc.Unsafe.getBooleanVolatile(Object, long)
_getByteVolatile           jdk.internal.misc.Unsafe.getByteVolatile(Object, long)
_getShortVolatile          jdk.internal.misc.Unsafe.getShortVolatile(Object, long)
_getCharVolatile           jdk.internal.misc.Unsafe.getCharVolatile(Object, long)
_getIntVolatile            jdk.internal.misc.Unsafe.getIntVolatile(Object, long)
_getLongVolatile           jdk.internal.misc.Unsafe.getLongVolatile(Object, long)
_getFloatVolatile          jdk.internal.misc.Unsafe.getFloatVolatile(Object, long)
_getDoubleVolatile         jdk.internal.misc.Unsafe.getDoubleVolatile(Object, long)

_putObjectVolatile         jdk.internal.misc.Unsafe.putObjectVolatile(Object, long, Object)
_putBooleanVolatile        jdk.internal.misc.Unsafe.putBooleanVolatile(Object, long, boolean)
_putByteVolatile           jdk.internal.misc.Unsafe.putByteVolatile(Object, long, byte)
_putShortVolatile          jdk.internal.misc.Unsafe.putShortVolatile(Object, long, short)
_putCharVolatile           jdk.internal.misc.Unsafe.putCharVolatile(Object, long, char)
_putIntVolatile            jdk.internal.misc.Unsafe.putIntVolatile(Object, long, int)
_putLongVolatile           jdk.internal.misc.Unsafe.putLongVolatile(Object, long, long)
_putFloatVolatile          jdk.internal.misc.Unsafe.putFloatVolatile(Object, long, float)
_putDoubleVolatile         jdk.internal.misc.Unsafe.putDoubleVolatile(Object, long, double)

_getObjectOpaque          jdk.internal.misc.Unsafe.getObjectOpaque(Object, long)
_getBooleanOpaque         jdk.internal.misc.Unsafe.getBooleanOpaque(Object, long)
_getByteOpaque            jdk.internal.misc.Unsafe.getByteOpaque(Object, long)
_getShortOpaque           jdk.internal.misc.Unsafe.getShortOpaque(Object, long)
_getCharOpaque            jdk.internal.misc.Unsafe.getCharOpaque(Object, long)
_getIntOpaque             jdk.internal.misc.Unsafe.getIntOpaque(Object, long)
_getLongOpaque            jdk.internal.misc.Unsafe.getLongOpaque(Object, long)
_getFloatOpaque           jdk.internal.misc.Unsafe.getFloatOpaque(Object, long)
_getDoubleOpaque          jdk.internal.misc.Unsafe.getDoubleOpaque(Object, long)

_putObjectOpaque          jdk.internal.misc.Unsafe.putObjectOpaque(Object, long, Object)
_putBooleanOpaque         jdk.internal.misc.Unsafe.putBooleanOpaque(Object, long, boolean)
_putByteOpaque            jdk.internal.misc.Unsafe.putByteOpaque(Object, long, byte)
_putShortOpaque           jdk.internal.misc.Unsafe.putShortOpaque(Object, long, short)
_putCharOpaque            jdk.internal.misc.Unsafe.putCharOpaque(Object, long, char)
_putIntOpaque             jdk.internal.misc.Unsafe.putIntOpaque(Object, long, int)
_putLongOpaque            jdk.internal.misc.Unsafe.putLongOpaque(Object, long, long)
_putFloatOpaque           jdk.internal.misc.Unsafe.putFloatOpaque(Object, long, float)
_putDoubleOpaque          jdk.internal.misc.Unsafe.putDoubleOpaque(Object, long, double)

_getObjectAcquire        jdk.internal.misc.Unsafe.getObjectAcquire(Object, long)
_getBooleanAcquire       jdk.internal.misc.Unsafe.getBooleanAcquire(Object, long)
_getByteAcquire          jdk.internal.misc.Unsafe.getByteAcquire(Object, long)
_getShortAcquire         jdk.internal.misc.Unsafe.getShortAcquire(Object, long)
_getCharAcquire          jdk.internal.misc.Unsafe.getCharAcquire(Object, long)
_getIntAcquire           jdk.internal.misc.Unsafe.getIntAcquire(Object, long)
_getLongAcquire          jdk.internal.misc.Unsafe.getLongAcquire(Object, long)
_getFloatAcquire         jdk.internal.misc.Unsafe.getFloatAcquire(Object, long)
_getDoubleAcquire        jdk.internal.misc.Unsafe.getDoubleAcquire(Object, long)

_putObjectAcquire        jdk.internal.misc.Unsafe.putObjectAcquire(Object, long, Object)
_putBooleanAcquire       jdk.internal.misc.Unsafe.putBooleanAcquire(Object, long, boolean)
_putByteAcquire          jdk.internal.misc.Unsafe.putByteAcquire(Object, long, byte)
_putShortAcquire         jdk.internal.misc.Unsafe.putShortAcquire(Object, long, short)
_putCharAcquire          jdk.internal.misc.Unsafe.putCharAcquire(Object, long, char)
_putIntAcquire           jdk.internal.misc.Unsafe.putIntAcquire(Object, long, int)
_putLongAcquire          jdk.internal.misc.Unsafe.putLongAcquire(Object, long, long)
_putFloatAcquire         jdk.internal.misc.Unsafe.putFloatAcquire(Object, long, float)
_putDoubleAcquire        jdk.internal.misc.Unsafe.putDoubleAcquire(Object, long, double)

_getShortUnaligned         jdk.internal.misc.Unsafe.getShortUnaligned(Object, long)
_getCharUnaligned          jdk.internal.misc.Unsafe.getCharUnaligned(Object, long)
_getIntUnaligned           jdk.internal.misc.Unsafe.getIntUnaligned(Object, long)
_getLongUnaligned          jdk.internal.misc.Unsafe.getLongUnaligned(Object, long)

_putShortUnaligned         jdk.internal.misc.Unsafe.putShortUnaligned(Object, long, short)
_putCharUnaligned          jdk.internal.misc.Unsafe.putCharUnaligned(Object, long, char)
_putIntUnaligned           jdk.internal.misc.Unsafe.putIntUnaligned(Object, long, int)
_putLongUnaligned          jdk.internal.misc.Unsafe.putLongUnaligned(Object, long, long)

_compareAndSetObject              jdk.internal.misc.Unsafe.compareAndSetObject(Object, long, Object, Object)
_compareAndExchangeObject         jdk.internal.misc.Unsafe.compareAndExchangeObject(Object, long, Object, Object)
_compareAndExchangeObjectAcquire  jdk.internal.misc.Unsafe.compareAndExchangeObjectAcquire(Object, long, Object, Object)
_compareAndExchangeObjectRelease  jdk.internal.misc.Unsafe.compareAndExchangeObjectRelease(Object, long, Object, Object)
_compareAndSetLong                jdk.internal.misc.Unsafe.compareAndSetLong(Object, long, long, long)
_compareAndExchangeLong           jdk.internal.misc.Unsafe.compareAndExchangeLong(Object, long, long, long)
_compareAndExchangeLongAcquire    jdk.internal.misc.Unsafe.compareAndExchangeLongAcquire(Object, long, long, long)
_compareAndExchangeLongRelease    jdk.internal.misc.Unsafe.compareAndExchangeLongRelease(Object, long, long, long)
_compareAndSetInt                 jdk.internal.misc.Unsafe.compareAndSetInt(Object, long, int, int)
_compareAndExchangeInt            jdk.internal.misc.Unsafe.compareAndExchangeInt(Object, long, int, int)
_compareAndExchangeIntAcquire     jdk.internal.misc.Unsafe.compareAndExchangeIntAcquire(Object, long, int, int)
_compareAndExchangeIntRelease     jdk.internal.misc.Unsafe.compareAndExchangeIntRelease(Object, long, int, int)
_compareAndSetByte                jdk.internal.misc.Unsafe.compareAndSetByte(Object, long, byte, byte)
_compareAndExchangeByte           jdk.internal.misc.Unsafe.compareAndExchangeByte(Object, long, byte, byte)
_compareAndExchangeByteAcquire    jdk.internal.misc.Unsafe.compareAndExchangeByteAcquire(Object, long, byte, byte)
_compareAndExchangeByteRelease    jdk.internal.misc.Unsafe.compareAndExchangeByteRelease(Object, long, byte, byte)
_compareAndSetShort               jdk.internal.misc.Unsafe.compareAndSetShort(Object, long, short, short)
_compareAndExchangeShort          jdk.internal.misc.Unsafe.compareAndExchangeShort(Object, long, short, short)
_compareAndExchangeShortAcquire   jdk.internal.misc.Unsafe.compareAndExchangeShortAcquire(Object, long, short, short)
_compareAndExchangeShortRelease   jdk.internal.misc.Unsafe.compareAndExchangeShortRelease(Object, long, short, short)

_weakCompareAndSetObjectPlain     jdk.internal.misc.Unsafe.weakCompareAndSetObjectPlain(Object, long, Object, Object)
_weakCompareAndSetObjectAcquire   jdk.internal.misc.Unsafe.weakCompareAndSetObjectAcquire(Object, long, Object, Object)
_weakCompareAndSetObjectRelease   jdk.internal.misc.Unsafe.weakCompareAndSetObjectRelease(Object, long, Object, Object)
_weakCompareAndSetObject          jdk.internal.misc.Unsafe.weakCompareAndSetObject(Object, long, Object, Object)
_weakCompareAndSetLongPlain       jdk.internal.misc.Unsafe.weakCompareAndSetLongPlain(Object, long, long, long)
_weakCompareAndSetLongAcquire     jdk.internal.misc.Unsafe.weakCompareAndSetLongAcquire(Object, long, long, long)
_weakCompareAndSetLongRelease     jdk.internal.misc.Unsafe.weakCompareAndSetLongRelease(Object, long, long, long)
_weakCompareAndSetLong            jdk.internal.misc.Unsafe.weakCompareAndSetLong(Object, long, long, long)
_weakCompareAndSetIntPlain        jdk.internal.misc.Unsafe.weakCompareAndSetIntPlain(Object, long, int, int)
_weakCompareAndSetIntAcquire      jdk.internal.misc.Unsafe.weakCompareAndSetIntAcquire(Object, long, int, int)
_weakCompareAndSetIntRelease      jdk.internal.misc.Unsafe.weakCompareAndSetIntRelease(Object, long, int, int)
_weakCompareAndSetInt             jdk.internal.misc.Unsafe.weakCompareAndSetInt(Object, long, int, int)
_weakCompareAndSetBytePlain       jdk.internal.misc.Unsafe.weakCompareAndSetBytePlain(Object, long, byte, byte)
_weakCompareAndSetByteAcquire     jdk.internal.misc.Unsafe.weakCompareAndSetByteAcquire(Object, long, byte, byte)
_weakCompareAndSetByteRelease     jdk.internal.misc.Unsafe.weakCompareAndSetByteRelease(Object, long, byte, byte)
_weakCompareAndSetByte            jdk.internal.misc.Unsafe.weakCompareAndSetByte(Object, long, byte, byte)
_weakCompareAndSetShortPlain      jdk.internal.misc.Unsafe.weakCompareAndSetShortPlain(Object, long, short, short)
_weakCompareAndSetShortAcquire    jdk.internal.misc.Unsafe.weakCompareAndSetShortAcquire(Object, long, short, short)
_weakCompareAndSetShortRelease    jdk.internal.misc.Unsafe.weakCompareAndSetShortRelease(Object, long, short, short)
_weakCompareAndSetShort           jdk.internal.misc.Unsafe.weakCompareAndSetShort(Object, long, short, short)

_getAndAddInt             jdk.internal.misc.Unsafe.getAndAddInt(Object, long, int)
_getAndAddLong            jdk.internal.misc.Unsafe.getAndAddLong(Object, long, long)
_getAndAddByte            jdk.internal.misc.Unsafe.getAndAddByte(Object, long, byte)
_getAndAddShort           jdk.internal.misc.Unsafe.getAndAddShort(Object, long, short)
_getAndSetInt             jdk.internal.misc.Unsafe.getAndSetInt(Object, long, int)
_getAndSetLong            jdk.internal.misc.Unsafe.getAndSetLong(Object, long, int)
_getAndSetByte            jdk.internal.misc.Unsafe.getAndSetByte(Object, long, byte)
_getAndSetShort           jdk.internal.misc.Unsafe.getAndSetShort(Object, long, short)
_getAndSetObject          jdk.internal.misc.Unsafe.getAndSetObject(Object, long, Object)

Класс sun.misc.Unsafe переехал в другой пакет — jdk.internal.misc.Unsafe, также был сильно переработан. Добавлено большое число интринсиков.

lava.lang.Throwable

Из JDK 9 удалена intrinsic-функция для Throwable.fillInStackTrace().

java.lang.StringBuilder

_StringBuilder_void          java.lang.StringBuilder()
_StringBuilder_int           java.lang.StringBuilder(int)
_StringBuilder_String        java.lang.StringBuilder(String)

_StringBuilder_append_char   java.lang.StringBuilder.append(char)
_StringBuilder_append_int    java.lang.StringBuilder.append(int)
_StringBuilder_append_String java.lang.StringBuilder.append(String)

_StringBuilder_toString        java.lang.StringBuilder.toString()

java.lang.StringBuffer

_StringBuffer_void          java.lang.StringBuffer()
_StringBuffer_int           java.lang.StringBuffer(int)
_StringBuffer_String        java.lang.StringBuffer(String)

_StringBuffer_append_char   java.lang.StringBuffer.append(char)
_StringBuffer_append_int    java.lang.StringBuffer.append(int)
_StringBuffer_append_String java.lang.StringBuffer.append(String)

_StringBuffer_toString         java.lang.StringBuffer.toString()

java.lang.invoke.MethodHandle

_invokeGeneric            java.lang.invoke.MethodHandle.invoke*
_invokeBasic              java.lang.invoke.MethodHandle.invokeBasic*
_linkToVirtual            java.lang.invoke.MethodHandle.linkToVirtual*
_linkToStatic             java.lang.invoke.MethodHandle.linkToStatic*
_linkToSpecial            java.lang.invoke.MethodHandle.linkToSpecial*
_linkToInterface          java.lang.invoke.MethodHandle.linkToInterface*
_compiledLambdaForm       java.lang.invoke.MethodHandle.<compiledLambdaForm>*

_profileBoolean    java.lang.invoke.MethodHandleImpl.profileBoolean(boolean, int[])
_isCompileConstant java.lang.invoke.MethodHandleImpl.isCompileConstant(Object)

Новый метод java.lang.invoke.MethodHandleImpl.isCompileConstant().

Boxing и Unboxing

_booleanValue             java.lang.Boolean.booleanValue()
_byteValue                java.lang.Byte.byteValue()
_charValue                java.lang.Character.charValue()
_shortValue               java.lang.Short.shortValue()
_intValue                 java.lang.Integer.intValue()
_longValue                java.lang.Long.longValue()
_floatValue               java.lang.Float.floatValue()
_doubleValue              java.lang.Double.doubleValue()

_Boolean_valueOf          java.lang.Boolean.valueOf(boolean)
_Byte_valueOf             java.lang.Byte.valueOf(byte)
_Character_valueOf        java.lang.Character.valueOf(char)
_Short_valueOf            java.lang.Short.valueOf(short)
_Integer_valueOf          java.lang.Integer.valueOf(int)
_Long_valueOf             java.lang.Long.valueOf(long)
_Float_valueOf            java.lang.Float.valueOf(float)
_Double_valueOf           java.lang.Double.valueOf(double)

java.util.stream.StreamsRangeIntSpliterator

_forEachRemaining java_util_stream_StreamsRangeIntSpliterator.forEachRemaining(java.util.function.IntConsumer)

В JDK 9 появился интринсик для метода StreamRangeIntSpliterator.forEachRemaining.

Intrinsic-функции в JDK 10

В JDK 10 количество интринсиков не изменилось и полностью совпадает с JDK 9.

Intrinsic-функции в JDK 10

java.lang.Object

_hashCode                 java.lang.Object.hashCode()
_getClass                 java.lang.Object.getClass()
_clone                    java.lang.Object.clone()

_notify                   java.lang.Object.notify()
_notifyAll                java.lang.Object.notifyAll()

_Object_init              java.lang.Object()

java.lang.Math

_dabs                     java.lang.Math.abs(double)
_dsin                     java.lang.Math.sin(double)
_dcos                     java.lang.Math.cos(double)
_dtan                     java.lang.Math.tan(double)
_datan2                   java.lang.Math.atan2(double, double)
_dsqrt                    java.lang.Math.sqrt(double)
_dlog                     java.lang.Math.log(double)
_dlog10                   java.lang.Math.log10(double)
_dpow                     java.lang.Math.pow(double, double)
_dexp                     java.lang.Math.exp(double)
_min                      java.lang.Math.min(int, int)
_max                      java.lang.Math.max(int, int)

_addExactI                java.lang.Math.addExact(int, int)
_addExactL                java.lang.Math.addExact(long, long)
_decrementExactI          java.lang.Math.decrementExact(int)
_decrementExactL          java.lang.Math.decrementExact(long)
_incrementExactI          java.lang.Math.incrementExact(int)
_incrementExactL          java.lang.Math.incrementExact(long)
_multiplyExactI           java.lang.Math.multiplyExact(int, int)
_multiplyExactL           java.lang.Math.multiplyExact(long, long)
_negateExactI             java.lang.Math.negateExact(int)
_negateExactL             java.lang.Math.negateExact(long)
_subtractExactI           java.lang.Math.subtractExact(int, int)
_subtractExactL           java.lang.Math.subtractExact(long, long)

_fmaD                     java.lang.Math.fma(double, double, double)
_fmaF                     java.lang.Math.fma(float, float, float)

Double, Float

_floatToRawIntBits        java.lang.Float.floatToRawIntBits(float)
_floatToIntBits           java.lang.Float.floatToIntBits(float)
_intBitsToFloat           java.lang.Float.intBitsToFloat(int)

_doubleToRawLongBits      java.lang.Double.doubleToRawLongBits(double)
_doubleToLongBits         java.lang.Double.doubleToLongBits(double)
_longBitsToDouble         java.lang.Double.longBitsToDouble(long)

Integer, Long, Character, Short

_numberOfLeadingZeros_i   java.lang.Integer.numberOfLeadingZeros(int)
_numberOfLeadingZeros_l   java.lang.Long.numberOfLeadingZeros(long)

_numberOfTrailingZeros_i  java.lang.Integer.numberOfTrailingZeros(int)
_numberOfTrailingZeros_l  java.lang.Long.numberOfTrailingZeros(long)

_bitCount_i               java.lang.Integer.bitCount(int)
_bitCount_l               java.lang.Long.bitCount(long)

_reverseBytes_i           java.lang.Integer.reverseBytes(int)
_reverseBytes_l           java.lang.Long.reverseBytes(long)
_reverseBytes_c           java.lang.Character.reverseBytes(char)
_reverseBytes_s           java.lang.Short.reverseBytes(short)

_Integer_toString         java.lang.Integer.toString(int)

java.lang.System

_identityHashCode         java.lang.System.identityHashCode(Object)
_currentTimeMillis        java.lang.System.currentTimeMillis()
_nanoTime                 java.lang.System.nanoTime()
_arraycopy                java.lang.System.arraycopy(Object, int, Object, int, int)

java.lang.Thread

_isInterrupted            java.lang.Thread.isInterrupted(boolean)
_currentThread            java.lang.Thread.currentThread()

_onSpinWait               java.lang.Thread.onSpinWait()

java.lang.Class

_isAssignableFrom         java.lang.Class.isAssignableFrom(Class)
_isInstance               java.lang.Class.isInstance(Object)
_getModifiers             java.lang.Class.getModifiers()
_isInterface              java.lang.Class.isInterface()
_isArray                  java.lang.Class.isArray()
_isPrimitive              java.lang.Class.isPrimitive()
_getSuperclass            java.lang.Class.getSuperclass()

_Class_cast               java.lang.Class.cast(Object)

Reflection

_getClassAccessFlags      sun.reflect.Reflection.getClassAccessFlags(Class)
_getCallerClass           sun.reflect.Reflection.getCallerClass()

_getLength                java.lang.reflect.Array.getLength(Object)
_newArray                 java.lang.reflect.Array.newArray(Class, int)

_invoke                   java.lang.reflect.Method.invoke(Object, Object...)

java.util.Arrays

_copyOf                   java.util.Arrays.copyOf(Object[], int, Class)
_copyOfRange              java.util.Arrays.copyOfRange(Object[], int, int, Class)
_equalsC                  java.util.Arrays.equals(char[], char[])
_equalsB                  java.util.Arrays.equals(boolean[], boolean[])

StringUTF16 и StringLatin1

_compressStringC          java.lang.StringUTF16.compress(char[], int, byte[], int, int)
_compressStringB          java.lang.StringUTF16.compress(byte[], int, byte[], int, int)

_inflateStringC           java.lang.StringLatin1.inflate(byte[], int, char[], int, int)
_inflateStringB           java.lang.StringLatin1.inflate(byte[], int, byte[], int, int)

_toBytesStringU           java.lang.StringUTF16.toBytes(char[], int, int)
_getCharsStringU          java.lang.StringUTF16.getChars(byte[], int, int, char[], int)
_getCharStringU           java.lang.StringUTF16.getChar(byte[], int)
_putCharStringU           java.lang.StringUTF16.putChar(byte[] int, int)

_compareToL               java.lang.StringLatin1.compareTo(byte[], byte[])
_compareToU               java.lang.StringUTF16.compareTo(byte[], byte[])
_compareToLU              java.lang.StringLatin1.compareToUTF16(byte[], byte[])
_compareToUL              java.lang.StringUTF16.compareToLatin1(byte[], byte[])

_indexOfL                 java.lang.StringLatin1.indexOf(byte[], byte[])
_indexOfU                 java.lang.StringUTF16.indexOf(byte[], byte[])
_indexOfUL                java.lang.StringUTF16.indexOfLatin1(byte[], byte[])
_indexOfIL                java.lang.StringLatin1.indexOf(byte[], int, byte[], int, int)
_indexOfIU                java.lang.StringUTF16.indexOf(byte[], int, byte[], int, int)
_indexOfIUL               java.lang.StringUTF16.indexOfLatin1(byte[], int, byte[], int, int)
_indexOfU_char            java.lang.StringUTF16.indexOfChar(byte[], int, int, int)

_equalsL                  java.lang.StringLatin1.equals(byte[], byte[])
_equalsU                  java.lang.StringUTF16.equals(byte[], byte[])

jdk.internal.util.Preconditions

_Preconditions_checkIndex jdk.internal.util.Preconditions.checkIndex(int, int, java.util.function.BiFunction)

java.lang.StringCoding

_hasNegatives             java.lang.StringCoding.hasNegatives(byte[], int, int)
_encodeByteISOArray       java.lang.StringCoding.encodeISOArray(byte[], int, byte[], int, int)

java.lang.String

_String_String            java.lang.String(String)

java.nio.Buffer

_checkIndex               java.nio.Buffer.checkIndex(int)

sun.nio.cs.ISO_8859_1$Encoder

_encodeISOArray     sun.nio.cs.ISO_8859_1.Encoder.encodeISOArray(char[], int, byte[], int, int)

java.math.BigInteger

_multiplyToLen       java.math.BigInteger.multiplyToLen(int[], int, int[], int, int[])
_squareToLen         java.math.BigInteger.squareToLen(int[], int, int[], int)
_mulAdd              java.math.BigInteger.mulAdd(int[], int[], int, int, int)
_montgomeryMultiply  java.math.BigInteger.montgomeryMultiply(int[], int[], int[], int, long, int[])
_montgomerySquare    java.math.BigInteger.montgomerySquare(int[], int[], int, long, int[])

java.util.ArraysSupport

_vectorizedMismatch java.util.ArraysSupport.vectorizedMismatch(Object, long, Object, long, int, int)

java.lang.ref.Reference

_Reference_get            java.lang.ref.Reference.get()

Cryptography

_aescrypt_encryptBlock com.sun.crypto.provider.AESCrypt.encryptBlock(byte[], in, byte[], int)
_aescrypt_decryptBlock com.sun.crypto.provider.AESCrypt.decryptBlock(byte[], in, byte[], int)
_cipherBlockChaining_encryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.encrypt(byte[], int, int, byte[], int)
_cipherBlockChaining_decryptAESCrypt com.sun.crypto.provider.CipherBlockChaining.decrypt(byte[], int, int, byte[], int)

_counterMode_AESCrypt com.sun.crypto.provider.CounterMode.implCrypt(byte[], int, int, byte[], int)

_ghash_processBlocks com.sun.crypto.provider.GHASH.processBlocks(byte[], int, int, long[], long[])

sun.security.provider.*

_sha_implCompress sun.security.provider.SHA.implCompress(byte[], int)
_sha2_implCompress sun.security.provider.SHA2.implCompress(byte[], int)
_sha5_implCompress sun.security.provider.SHA5.implCompress(byte[], int)

_digestBase_implCompressMB sun.security.provider.DigestBase.implCompressMultiBlock0(byte[], int, int)

java.util.zip.CRC32 и java.util.zip.CRC32C

_updateCRC32               java.util.zip.CRC32.update(int2_int_signature)
_updateBytesCRC32          java.util.zip.CRC32.updateBytes0(updateBytes_signature)
_updateByteBufferCRC32     java.util.zip.CRC32.updateByteBuffer0(updateByteBuffer_signature)

_updateBytesCRC32C             java.util.zip.CRC32C.updateBytes(int, byte[], int, int)
_updateDirectByteBufferCRC32C  java.util.zip.CRC32C.updateDirectByteBuffer(int, long, int, int)

_updateBytesAdler32       java.util.zip.Adler32.updateBytes(int, byte[], int, int)
_updateByteBufferAdler32  java.util.zip.Adler32.updateByteBuffer(int, long, int, int)

jdk.internal.misc.Unsafe

_allocateInstance         jdk.internal.misc.Unsafe.allocateInstance(Class)
_allocateUninitializedArray jdk.internal.misc.Unsafe.allocateUninitializedArray0(Class, int)
_copyMemory               jdk.internal.misc.Unsafe.copyMemory0(Object, long, Object, long, long)

_park                     jdk.internal.misc.Unsafe.park(boolean, long)
_unpark                   jdk.internal.misc.Unsafe.unpark(Object)

_loadFence                jdk.internal.misc.Unsafe.loadFence()
_storeFence                jdk.internal.misc.Unsafe.storeFence()
_fullFence                 jdk.internal.misc.Unsafe.fullFence()

_getObject                 jdk.internal.misc.Unsafe.getObject(Object, long)
_getBoolean                jdk.internal.misc.Unsafe.getBoolean(Object, long)
_getByte                   jdk.internal.misc.Unsafe.getByte(Object, long)
_getShort                  jdk.internal.misc.Unsafe.getShort(Object, long)
_getChar                   jdk.internal.misc.Unsafe.getChar(Object, long)
_getInt                    jdk.internal.misc.Unsafe.getInt(Object, long)
_getLong                   jdk.internal.misc.Unsafe.getLong(Object, long)
_getFloat                  jdk.internal.misc.Unsafe.getFloat(Object, long)
_getDouble                 jdk.internal.misc.Unsafe.getDouble(Object, long)

_putObject                 jdk.internal.misc.Unsafe.putObject(Object, long, Object)
_putBoolean                jdk.internal.misc.Unsafe.putBoolean(Object, long, boolean)
_putByte                   jdk.internal.misc.Unsafe.putByte(Object, long, byte)
_putShort                  jdk.internal.misc.Unsafe.putShort(Object, long, short)
_putChar                   jdk.internal.misc.Unsafe.putChar(Object, long, char)
_putInt                    jdk.internal.misc.Unsafe.putInt(Object, long, int)
_putLong                   jdk.internal.misc.Unsafe.putLong(Object, long, long)
_putFloat                  jdk.internal.misc.Unsafe.putFloat(Object, long, float)
_putDouble                 jdk.internal.misc.Unsafe.putDouble(Object, long, double)

_getObjectVolatile         jdk.internal.misc.Unsafe.getObjectVolatile(Object, long)
_getBooleanVolatile        jdk.internal.misc.Unsafe.getBooleanVolatile(Object, long)
_getByteVolatile           jdk.internal.misc.Unsafe.getByteVolatile(Object, long)
_getShortVolatile          jdk.internal.misc.Unsafe.getShortVolatile(Object, long)
_getCharVolatile           jdk.internal.misc.Unsafe.getCharVolatile(Object, long)
_getIntVolatile            jdk.internal.misc.Unsafe.getIntVolatile(Object, long)
_getLongVolatile           jdk.internal.misc.Unsafe.getLongVolatile(Object, long)
_getFloatVolatile          jdk.internal.misc.Unsafe.getFloatVolatile(Object, long)
_getDoubleVolatile         jdk.internal.misc.Unsafe.getDoubleVolatile(Object, long)

_putObjectVolatile         jdk.internal.misc.Unsafe.putObjectVolatile(Object, long, Object)
_putBooleanVolatile        jdk.internal.misc.Unsafe.putBooleanVolatile(Object, long, boolean)
_putByteVolatile           jdk.internal.misc.Unsafe.putByteVolatile(Object, long, byte)
_putShortVolatile          jdk.internal.misc.Unsafe.putShortVolatile(Object, long, short)
_putCharVolatile           jdk.internal.misc.Unsafe.putCharVolatile(Object, long, char)
_putIntVolatile            jdk.internal.misc.Unsafe.putIntVolatile(Object, long, int)
_putLongVolatile           jdk.internal.misc.Unsafe.putLongVolatile(Object, long, long)
_putFloatVolatile          jdk.internal.misc.Unsafe.putFloatVolatile(Object, long, float)
_putDoubleVolatile         jdk.internal.misc.Unsafe.putDoubleVolatile(Object, long, double)

_getObjectOpaque          jdk.internal.misc.Unsafe.getObjectOpaque(Object, long)
_getBooleanOpaque         jdk.internal.misc.Unsafe.getBooleanOpaque(Object, long)
_getByteOpaque            jdk.internal.misc.Unsafe.getByteOpaque(Object, long)
_getShortOpaque           jdk.internal.misc.Unsafe.getShortOpaque(Object, long)
_getCharOpaque            jdk.internal.misc.Unsafe.getCharOpaque(Object, long)
_getIntOpaque             jdk.internal.misc.Unsafe.getIntOpaque(Object, long)
_getLongOpaque            jdk.internal.misc.Unsafe.getLongOpaque(Object, long)
_getFloatOpaque           jdk.internal.misc.Unsafe.getFloatOpaque(Object, long)
_getDoubleOpaque          jdk.internal.misc.Unsafe.getDoubleOpaque(Object, long)

_putObjectOpaque          jdk.internal.misc.Unsafe.putObjectOpaque(Object, long, Object)
_putBooleanOpaque         jdk.internal.misc.Unsafe.putBooleanOpaque(Object, long, boolean)
_putByteOpaque            jdk.internal.misc.Unsafe.putByteOpaque(Object, long, byte)
_putShortOpaque           jdk.internal.misc.Unsafe.putShortOpaque(Object, long, short)
_putCharOpaque            jdk.internal.misc.Unsafe.putCharOpaque(Object, long, char)
_putIntOpaque             jdk.internal.misc.Unsafe.putIntOpaque(Object, long, int)
_putLongOpaque            jdk.internal.misc.Unsafe.putLongOpaque(Object, long, long)
_putFloatOpaque           jdk.internal.misc.Unsafe.putFloatOpaque(Object, long, float)
_putDoubleOpaque          jdk.internal.misc.Unsafe.putDoubleOpaque(Object, long, double)

_getObjectAcquire        jdk.internal.misc.Unsafe.getObjectAcquire(Object, long)
_getBooleanAcquire       jdk.internal.misc.Unsafe.getBooleanAcquire(Object, long)
_getByteAcquire          jdk.internal.misc.Unsafe.getByteAcquire(Object, long)
_getShortAcquire         jdk.internal.misc.Unsafe.getShortAcquire(Object, long)
_getCharAcquire          jdk.internal.misc.Unsafe.getCharAcquire(Object, long)
_getIntAcquire           jdk.internal.misc.Unsafe.getIntAcquire(Object, long)
_getLongAcquire          jdk.internal.misc.Unsafe.getLongAcquire(Object, long)
_getFloatAcquire         jdk.internal.misc.Unsafe.getFloatAcquire(Object, long)
_getDoubleAcquire        jdk.internal.misc.Unsafe.getDoubleAcquire(Object, long)

_putObjectAcquire        jdk.internal.misc.Unsafe.putObjectAcquire(Object, long, Object)
_putBooleanAcquire       jdk.internal.misc.Unsafe.putBooleanAcquire(Object, long, boolean)
_putByteAcquire          jdk.internal.misc.Unsafe.putByteAcquire(Object, long, byte)
_putShortAcquire         jdk.internal.misc.Unsafe.putShortAcquire(Object, long, short)
_putCharAcquire          jdk.internal.misc.Unsafe.putCharAcquire(Object, long, char)
_putIntAcquire           jdk.internal.misc.Unsafe.putIntAcquire(Object, long, int)
_putLongAcquire          jdk.internal.misc.Unsafe.putLongAcquire(Object, long, long)
_putFloatAcquire         jdk.internal.misc.Unsafe.putFloatAcquire(Object, long, float)
_putDoubleAcquire        jdk.internal.misc.Unsafe.putDoubleAcquire(Object, long, double)

_getShortUnaligned         jdk.internal.misc.Unsafe.getShortUnaligned(Object, long)
_getCharUnaligned          jdk.internal.misc.Unsafe.getCharUnaligned(Object, long)
_getIntUnaligned           jdk.internal.misc.Unsafe.getIntUnaligned(Object, long)
_getLongUnaligned          jdk.internal.misc.Unsafe.getLongUnaligned(Object, long)

_putShortUnaligned         jdk.internal.misc.Unsafe.putShortUnaligned(Object, long, short)
_putCharUnaligned          jdk.internal.misc.Unsafe.putCharUnaligned(Object, long, char)
_putIntUnaligned           jdk.internal.misc.Unsafe.putIntUnaligned(Object, long, int)
_putLongUnaligned          jdk.internal.misc.Unsafe.putLongUnaligned(Object, long, long)

_compareAndSetObject              jdk.internal.misc.Unsafe.compareAndSetObject(Object, long, Object, Object)
_compareAndExchangeObject         jdk.internal.misc.Unsafe.compareAndExchangeObject(Object, long, Object, Object)
_compareAndExchangeObjectAcquire  jdk.internal.misc.Unsafe.compareAndExchangeObjectAcquire(Object, long, Object, Object)
_compareAndExchangeObjectRelease  jdk.internal.misc.Unsafe.compareAndExchangeObjectRelease(Object, long, Object, Object)
_compareAndSetLong                jdk.internal.misc.Unsafe.compareAndSetLong(Object, long, long, long)
_compareAndExchangeLong           jdk.internal.misc.Unsafe.compareAndExchangeLong(Object, long, long, long)
_compareAndExchangeLongAcquire    jdk.internal.misc.Unsafe.compareAndExchangeLongAcquire(Object, long, long, long)
_compareAndExchangeLongRelease    jdk.internal.misc.Unsafe.compareAndExchangeLongRelease(Object, long, long, long)
_compareAndSetInt                 jdk.internal.misc.Unsafe.compareAndSetInt(Object, long, int, int)
_compareAndExchangeInt            jdk.internal.misc.Unsafe.compareAndExchangeInt(Object, long, int, int)
_compareAndExchangeIntAcquire     jdk.internal.misc.Unsafe.compareAndExchangeIntAcquire(Object, long, int, int)
_compareAndExchangeIntRelease     jdk.internal.misc.Unsafe.compareAndExchangeIntRelease(Object, long, int, int)
_compareAndSetByte                jdk.internal.misc.Unsafe.compareAndSetByte(Object, long, byte, byte)
_compareAndExchangeByte           jdk.internal.misc.Unsafe.compareAndExchangeByte(Object, long, byte, byte)
_compareAndExchangeByteAcquire    jdk.internal.misc.Unsafe.compareAndExchangeByteAcquire(Object, long, byte, byte)
_compareAndExchangeByteRelease    jdk.internal.misc.Unsafe.compareAndExchangeByteRelease(Object, long, byte, byte)
_compareAndSetShort               jdk.internal.misc.Unsafe.compareAndSetShort(Object, long, short, short)
_compareAndExchangeShort          jdk.internal.misc.Unsafe.compareAndExchangeShort(Object, long, short, short)
_compareAndExchangeShortAcquire   jdk.internal.misc.Unsafe.compareAndExchangeShortAcquire(Object, long, short, short)
_compareAndExchangeShortRelease   jdk.internal.misc.Unsafe.compareAndExchangeShortRelease(Object, long, short, short)

_weakCompareAndSetObjectPlain     jdk.internal.misc.Unsafe.weakCompareAndSetObjectPlain(Object, long, Object, Object)
_weakCompareAndSetObjectAcquire   jdk.internal.misc.Unsafe.weakCompareAndSetObjectAcquire(Object, long, Object, Object)
_weakCompareAndSetObjectRelease   jdk.internal.misc.Unsafe.weakCompareAndSetObjectRelease(Object, long, Object, Object)
_weakCompareAndSetObject          jdk.internal.misc.Unsafe.weakCompareAndSetObject(Object, long, Object, Object)
_weakCompareAndSetLongPlain       jdk.internal.misc.Unsafe.weakCompareAndSetLongPlain(Object, long, long, long)
_weakCompareAndSetLongAcquire     jdk.internal.misc.Unsafe.weakCompareAndSetLongAcquire(Object, long, long, long)
_weakCompareAndSetLongRelease     jdk.internal.misc.Unsafe.weakCompareAndSetLongRelease(Object, long, long, long)
_weakCompareAndSetLong            jdk.internal.misc.Unsafe.weakCompareAndSetLong(Object, long, long, long)
_weakCompareAndSetIntPlain        jdk.internal.misc.Unsafe.weakCompareAndSetIntPlain(Object, long, int, int)
_weakCompareAndSetIntAcquire      jdk.internal.misc.Unsafe.weakCompareAndSetIntAcquire(Object, long, int, int)
_weakCompareAndSetIntRelease      jdk.internal.misc.Unsafe.weakCompareAndSetIntRelease(Object, long, int, int)
_weakCompareAndSetInt             jdk.internal.misc.Unsafe.weakCompareAndSetInt(Object, long, int, int)
_weakCompareAndSetBytePlain       jdk.internal.misc.Unsafe.weakCompareAndSetBytePlain(Object, long, byte, byte)
_weakCompareAndSetByteAcquire     jdk.internal.misc.Unsafe.weakCompareAndSetByteAcquire(Object, long, byte, byte)
_weakCompareAndSetByteRelease     jdk.internal.misc.Unsafe.weakCompareAndSetByteRelease(Object, long, byte, byte)
_weakCompareAndSetByte            jdk.internal.misc.Unsafe.weakCompareAndSetByte(Object, long, byte, byte)
_weakCompareAndSetShortPlain      jdk.internal.misc.Unsafe.weakCompareAndSetShortPlain(Object, long, short, short)
_weakCompareAndSetShortAcquire    jdk.internal.misc.Unsafe.weakCompareAndSetShortAcquire(Object, long, short, short)
_weakCompareAndSetShortRelease    jdk.internal.misc.Unsafe.weakCompareAndSetShortRelease(Object, long, short, short)
_weakCompareAndSetShort           jdk.internal.misc.Unsafe.weakCompareAndSetShort(Object, long, short, short)

_getAndAddInt             jdk.internal.misc.Unsafe.getAndAddInt(Object, long, int)
_getAndAddLong            jdk.internal.misc.Unsafe.getAndAddLong(Object, long, long)
_getAndAddByte            jdk.internal.misc.Unsafe.getAndAddByte(Object, long, byte)
_getAndAddShort           jdk.internal.misc.Unsafe.getAndAddShort(Object, long, short)
_getAndSetInt             jdk.internal.misc.Unsafe.getAndSetInt(Object, long, int)
_getAndSetLong            jdk.internal.misc.Unsafe.getAndSetLong(Object, long, int)
_getAndSetByte            jdk.internal.misc.Unsafe.getAndSetByte(Object, long, byte)
_getAndSetShort           jdk.internal.misc.Unsafe.getAndSetShort(Object, long, short)
_getAndSetObject          jdk.internal.misc.Unsafe.getAndSetObject(Object, long, Object)

java.lang.StringBuilder

_StringBuilder_void          java.lang.StringBuilder()
_StringBuilder_int           java.lang.StringBuilder(int)
_StringBuilder_String        java.lang.StringBuilder(String)

_StringBuilder_append_char   java.lang.StringBuilder.append(char)
_StringBuilder_append_int    java.lang.StringBuilder.append(int)
_StringBuilder_append_String java.lang.StringBuilder.append(String)

_StringBuilder_toString        java.lang.StringBuilder.toString()

java.lang.StringBuffer

_StringBuffer_void          java.lang.StringBuffer()
_StringBuffer_int           java.lang.StringBuffer(int)
_StringBuffer_String        java.lang.StringBuffer(String)

_StringBuffer_append_char   java.lang.StringBuffer.append(char)
_StringBuffer_append_int    java.lang.StringBuffer.append(int)
_StringBuffer_append_String java.lang.StringBuffer.append(String)

_StringBuffer_toString         java.lang.StringBuffer.toString()

java.lang.invoke.MethodHandle

_invokeGeneric            java.lang.invoke.MethodHandle.invoke*
_invokeBasic              java.lang.invoke.MethodHandle.invokeBasic*
_linkToVirtual            java.lang.invoke.MethodHandle.linkToVirtual*
_linkToStatic             java.lang.invoke.MethodHandle.linkToStatic*
_linkToSpecial            java.lang.invoke.MethodHandle.linkToSpecial*
_linkToInterface          java.lang.invoke.MethodHandle.linkToInterface*
_compiledLambdaForm       java.lang.invoke.MethodHandle.<compiledLambdaForm>*

_profileBoolean    java.lang.invoke.MethodHandleImpl.profileBoolean(boolean, int[])
_isCompileConstant java.lang.invoke.MethodHandleImpl.isCompileConstant(Object)

Boxing и Unboxing

_booleanValue             java.lang.Boolean.booleanValue()
_byteValue                java.lang.Byte.byteValue()
_charValue                java.lang.Character.charValue()
_shortValue               java.lang.Short.shortValue()
_intValue                 java.lang.Integer.intValue()
_longValue                java.lang.Long.longValue()
_floatValue               java.lang.Float.floatValue()
_doubleValue              java.lang.Double.doubleValue()

_Boolean_valueOf          java.lang.Boolean.valueOf(boolean)
_Byte_valueOf             java.lang.Byte.valueOf(byte)
_Character_valueOf        java.lang.Character.valueOf(char)
_Short_valueOf            java.lang.Short.valueOf(short)
_Integer_valueOf          java.lang.Integer.valueOf(int)
_Long_valueOf             java.lang.Long.valueOf(long)
_Float_valueOf            java.lang.Float.valueOf(float)
_Double_valueOf           java.lang.Double.valueOf(double)

java.util.stream.StreamsRangeIntSpliterator

_forEachRemaining java_util_stream_StreamsRangeIntSpliterator.forEachRemaining(java.util.function.IntConsumer)

Преимущества intrinsic-функций

Интринсик предпочтительнее Java-кода в плане производительности по двум основным причинам: во-первых, нет необходимости в дополнительных проверках (проверки на null, границы массивов и прочее), которые приводят к различным RuntimeException, во-вторых, в intrinsic-функции могут быть реализованы platform-specific оптимизации.

По сравнению с JNI-вызовами отсутствуют накладные расходы, связанные с копированием данных (в native и обратно) и дополнительной прослойкой для контроля за Java-объектами, используемыми в native-коде.

Контроль

Чтобы посмотреть, какие интринсики были подставлены, можно воспользоваться опцией -XX:+PrintIntrinsics:

-XX:+UnlockDiagnosticVMOptions
-XX:+PrintIntrinsics

Чтобы убедиться в возможности интрисификации (использовании intrinsic-функций) только в режиме JIT-компиляции, можно запустить совместно с опцией -Xint (JVM запускается только в режиме интерпретатора).

Чтобы отключить использование конкретной intrinsic-функции, можно воспользоваться опцией -XX:DisableIntrinsic:

-XX:+UnlockDiagnosticVMOptions
-XX:DisableIntrinsic=<название интринсика>[,<название интринсика>]

Примечания

Важное замечание от apangin:

Нужно отметить, что не все из перечисленных методов являются интринсиками в прямом смысле, то есть, вовсе не обязательно, что JIT подставляет вместо вызова особый код. Некоторые компилируются как обычные Java методы, а их упоминание в vmSymbols.hpp обусловлено необходимостью отличить их в рантайме по другой причине.

Например, Method.invoke отмечен, чтобы не учитывать его в security check при обходе стека. Наличие Throwable.fillInStackTrace служит хинтом для Escape Analysys, а Unsafe.park/unpark и вовсе напрасно отмечены.

При этом с JDK 9 метод Throwable.fillInStackTrace вообще удалён из списка интринсиков.

Автор: gnkoshelev

Источник

Поделиться

* - обязательные к заполнению поля