-
Enhancement
-
Resolution: Unresolved
-
P3
-
18
The attached benchmark creates slices with both memory segments and byte buffers. When running the benchmark with this option:
-XX:CompileCommand=print,java/nio/HeapIntBuffer.slice -XX:CompileCommand=print,java/nio/DirectIntBufferU.slice -XX:CompileCommand=print,jdk/internal/foreign/AbstractMemorySegmentImpl.asSlice
Some memory barriers show up, of the kind:
0x00007f76a4f83109: lock addl $0x0,-0x40(%rsp)
These barriers seem to be extremely sensitive to how fields are stored (seeJDK-8279930), and they cause performance issues when said code is later inline into other methods.
Running with a GC other than G1 (e.g. -XX:+UseSerialGC) removes these barriers.
-XX:CompileCommand=print,java/nio/HeapIntBuffer.slice -XX:CompileCommand=print,java/nio/DirectIntBufferU.slice -XX:CompileCommand=print,jdk/internal/foreign/AbstractMemorySegmentImpl.asSlice
Some memory barriers show up, of the kind:
0x00007f76a4f83109: lock addl $0x0,-0x40(%rsp)
These barriers seem to be extremely sensitive to how fields are stored (see
Running with a GC other than G1 (e.g. -XX:+UseSerialGC) removes these barriers.
- relates to
-
JDK-8279930 Synthetic cast causes generation of store barriers when using heap segments
- Resolved
-
JDK-8231412 C2: InitializeNode::detect_init_independence() bails out on simple IR shapes
- Resolved