RFR: 8257622: MemoryAccess methods are missing @ForceInline annotations

Aleksey Shipilev shade at openjdk.java.net
Thu Dec 3 17:21:58 UTC 2020


On Wed, 2 Dec 2020 18:47:10 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> The accessor methods in the `MemoryAccess` class are missing `@ForceInline` annotations. This causes odd behavior on certain benchmarks, especially if these methods are called many times in the body of a single method.

Looks good with minor nit.

test/micro/org/openjdk/bench/jdk/incubator/foreign/LoopOverNonConstantFP.java line 72:

> 70:         unsafe_addrOut = unsafe.allocateMemory(ALLOC_SIZE);
> 71:         for (int i = 0; i < ELEM_SIZE; i++) {
> 72:             unsafe.putDouble(unsafe_addrIn + (i * CARRIER_SIZE) , i);

Here and later, excess whitespace before final comma.

-------------

Marked as reviewed by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1570


More information about the core-libs-dev mailing list