< prev index next >

test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadConstant.java

Print this page
*** 39,11 ***
  @BenchmarkMode(Mode.AverageTime)
  @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
  @Measurement(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
  @State(org.openjdk.jmh.annotations.Scope.Thread)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
! @Fork(value = 3, jvmArgsAppend = { "--enable-native-access=ALL-UNNAMED", "--enable-preview" })
  public class CallOverheadConstant {
  
      @Benchmark
      public void jni_blank() throws Throwable {
          blank();
--- 39,11 ---
  @BenchmarkMode(Mode.AverageTime)
  @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
  @Measurement(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
  @State(org.openjdk.jmh.annotations.Scope.Thread)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
! @Fork(value = 3, jvmArgsAppend = { "--enable-native-access=ALL-UNNAMED" })
  public class CallOverheadConstant {
  
      @Benchmark
      public void jni_blank() throws Throwable {
          blank();

*** 53,12 ***
      public void panama_blank() throws Throwable {
          func.invokeExact();
      }
  
      @Benchmark
!     public void panama_blank_trivial() throws Throwable {
!         func_trivial.invokeExact();
      }
  
      @Benchmark
      public int jni_identity() throws Throwable {
          return identity(10);
--- 53,12 ---
      public void panama_blank() throws Throwable {
          func.invokeExact();
      }
  
      @Benchmark
!     public void panama_blank_critical() throws Throwable {
!         func_critical.invokeExact();
      }
  
      @Benchmark
      public int jni_identity() throws Throwable {
          return identity(10);

*** 68,12 ***
      public int panama_identity() throws Throwable {
          return (int) identity.invokeExact(10);
      }
  
      @Benchmark
!     public int panama_identity_trivial() throws Throwable {
!         return (int) identity_trivial.invokeExact(10);
      }
  
      @Benchmark
      public MemorySegment panama_identity_struct_confined() throws Throwable {
          return (MemorySegment) identity_struct.invokeExact(recycling_allocator, confinedPoint);
--- 68,12 ---
      public int panama_identity() throws Throwable {
          return (int) identity.invokeExact(10);
      }
  
      @Benchmark
!     public int panama_identity_critical() throws Throwable {
!         return (int) identity_critical.invokeExact(10);
      }
  
      @Benchmark
      public MemorySegment panama_identity_struct_confined() throws Throwable {
          return (MemorySegment) identity_struct.invokeExact(recycling_allocator, confinedPoint);
< prev index next >