$ ~/trunks/jdk9-dev-string-compress/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -jar target/string-density-bench.jar Equals -p cmp=0.0 -p size=64 -prof perfasm # VM invoker: /home/shade/trunks/jdk9-dev-string-compress/build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/bin/java # VM options: # Warmup: 50 iterations, 100 ms each # Measurement: 50 iterations, 100 ms each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: org.openjdk.strings.Equals.test # Parameters: (cmp = 0.0, size = 64) # Run progress: 0.00% complete, ETA 00:00:10 # Fork: 1 of 1 # Preparing profilers: perfasm # Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console # Warmup Iteration 1: 67.970 ns/op # Warmup Iteration 2: 67.140 ns/op # Warmup Iteration 3: 64.822 ns/op # Warmup Iteration 4: 67.909 ns/op # Warmup Iteration 5: 67.958 ns/op # Warmup Iteration 6: 66.844 ns/op # Warmup Iteration 7: 65.649 ns/op # Warmup Iteration 8: 67.885 ns/op # Warmup Iteration 9: 64.547 ns/op # Warmup Iteration 10: 65.194 ns/op # Warmup Iteration 11: 68.016 ns/op # Warmup Iteration 12: 69.562 ns/op # Warmup Iteration 13: 65.151 ns/op # Warmup Iteration 14: 67.332 ns/op # Warmup Iteration 15: 64.853 ns/op # Warmup Iteration 16: 64.984 ns/op # Warmup Iteration 17: 67.527 ns/op # Warmup Iteration 18: 64.363 ns/op # Warmup Iteration 19: 67.794 ns/op # Warmup Iteration 20: 65.977 ns/op # Warmup Iteration 21: 66.380 ns/op # Warmup Iteration 22: 66.996 ns/op # Warmup Iteration 23: 64.892 ns/op # Warmup Iteration 24: 69.057 ns/op # Warmup Iteration 25: 68.601 ns/op # Warmup Iteration 26: 67.190 ns/op # Warmup Iteration 27: 65.125 ns/op # Warmup Iteration 28: 69.019 ns/op # Warmup Iteration 29: 68.123 ns/op # Warmup Iteration 30: 67.341 ns/op # Warmup Iteration 31: 67.353 ns/op # Warmup Iteration 32: 65.356 ns/op # Warmup Iteration 33: 65.225 ns/op # Warmup Iteration 34: 65.572 ns/op # Warmup Iteration 35: 66.115 ns/op # Warmup Iteration 36: 66.123 ns/op # Warmup Iteration 37: 64.380 ns/op # Warmup Iteration 38: 64.483 ns/op # Warmup Iteration 39: 65.626 ns/op # Warmup Iteration 40: 64.551 ns/op # Warmup Iteration 41: 67.706 ns/op # Warmup Iteration 42: 67.726 ns/op # Warmup Iteration 43: 64.658 ns/op # Warmup Iteration 44: 67.747 ns/op # Warmup Iteration 45: 67.866 ns/op # Warmup Iteration 46: 64.553 ns/op # Warmup Iteration 47: 67.345 ns/op # Warmup Iteration 48: 64.579 ns/op # Warmup Iteration 49: 67.209 ns/op # Warmup Iteration 50: 66.062 ns/op Iteration 1: 64.488 ns/op Iteration 2: 65.741 ns/op Iteration 3: 65.439 ns/op Iteration 4: 64.436 ns/op Iteration 5: 64.525 ns/op Iteration 6: 65.580 ns/op Iteration 7: 64.425 ns/op Iteration 8: 64.414 ns/op Iteration 9: 66.392 ns/op Iteration 10: 66.826 ns/op Iteration 11: 66.185 ns/op Iteration 12: 66.624 ns/op Iteration 13: 65.247 ns/op Iteration 14: 66.581 ns/op Iteration 15: 65.737 ns/op Iteration 16: 65.570 ns/op Iteration 17: 65.111 ns/op Iteration 18: 68.412 ns/op Iteration 19: 67.425 ns/op Iteration 20: 67.122 ns/op Iteration 21: 67.849 ns/op Iteration 22: 65.678 ns/op Iteration 23: 69.548 ns/op Iteration 24: 65.186 ns/op Iteration 25: 66.729 ns/op Iteration 26: 70.064 ns/op Iteration 27: 66.223 ns/op Iteration 28: 67.329 ns/op Iteration 29: 65.870 ns/op Iteration 30: 67.275 ns/op Iteration 31: 66.599 ns/op Iteration 32: 67.262 ns/op Iteration 33: 68.665 ns/op Iteration 34: 68.792 ns/op Iteration 35: 66.120 ns/op Iteration 36: 66.625 ns/op Iteration 37: 64.597 ns/op Iteration 38: 67.768 ns/op Iteration 39: 67.236 ns/op Iteration 40: 67.792 ns/op Iteration 41: 65.236 ns/op Iteration 42: 67.535 ns/op Iteration 43: 67.694 ns/op Iteration 44: 65.789 ns/op Iteration 45: 65.607 ns/op Iteration 46: 67.829 ns/op Iteration 47: 65.810 ns/op Iteration 48: 66.037 ns/op Iteration 49: 67.884 ns/op Iteration 50: 66.135 ns/op # Processing profiler results: perfasm Result: 66.501 ±(99.9%) 0.669 ns/op [Average] Statistics: (min, avg, max) = (64.414, 66.501, 70.064), stdev = 1.352 Confidence interval (99.9%): [65.832, 67.170] PrintAssembly processed: 85817 total address lines. Perf output processed (skipped 6.000 seconds): Column 1: cycles (17014 events) Column 2: instructions (16908 events) Hottest code regions (>10.00% "cycles" events): ....[Hottest Region 1].............................................................................. [0x7f4b14ae248f:0x7f4b14ae2549] in org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub ; - java.lang.String::equals@79 (line 1029) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae2484: mov $0x1,%edx 0x00007f4b14ae2489: jmp 0x00007f4b14ae2426 ;*iconst_0 ; - java.lang.String::equals@153 (line 1045) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae248b: xor %edx,%edx 0x00007f4b14ae248d: jmp 0x00007f4b14ae2491 1.98% 1.99% 0x00007f4b14ae248f: xor %edx,%edx ;*invokevirtual equals ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.36% 0.44% 0x00007f4b14ae2491: mov 0x18(%rsp),%rsi 3.00% 3.59% 0x00007f4b14ae2496: nop 0x00007f4b14ae2497: callq 0x00007f4b0d044fe0 ; OopMap{[0]=Oop [8]=Oop [16]=Oop [24]=Oop off=380} ;*invokevirtual consume ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@19 (line 204) ; {optimized virtual_call} 3.36% 0.17% 0x00007f4b14ae249c: mov (%rsp),%r10 0x00007f4b14ae24a0: movzbl 0x94(%r10),%r10d ;*getfield isDone ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@29 (line 206) 0.01% 0x00007f4b14ae24a8: add $0x1,%rbp ; OopMap{[0]=Oop [8]=Oop [16]=Oop [24]=Oop off=396} ;*ifeq ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@32 (line 206) 0.40% 0.03% 0x00007f4b14ae24ac: test %eax,0x10d82b4e(%rip) # 0x00007f4b25865000 ; {poll} 0x00007f4b14ae24b2: test %r10d,%r10d 0x00007f4b14ae24b5: jne 0x00007f4b14ae2452 ;*aload ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@13 (line 204) 0.01% 0x00007f4b14ae24b7: mov 0x10(%rsp),%r10 0x00007f4b14ae24bc: mov 0x18(%r10),%ecx ;*getfield i ; - org.openjdk.strings.Equals::test@5 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.32% 0.07% 0x00007f4b14ae24c0: mov 0x14(%r10),%r9d ;*getfield s ; - org.openjdk.strings.Equals::test@1 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae24c4: movsbl 0x14(%r12,%r9,8),%r11d ;*getfield coder ; - java.lang.String::equals@31 (line 1021) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) ; implicit exception: dispatches to 0x00007f4b14ae261d 0.24% 0.02% 0x00007f4b14ae24ca: cmp %ecx,%r9d 0x00007f4b14ae24cd: je 0x00007f4b14ae2558 ;*if_acmpne ; - java.lang.String::equals@2 (line 1014) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae24d3: test %ecx,%ecx 0x00007f4b14ae24d5: je 0x00007f4b14ae248b ;*instanceof ; - java.lang.String::equals@8 (line 1017) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.34% 0.10% 0x00007f4b14ae24d7: movsbl 0x14(%r12,%rcx,8),%edi ;*getfield coder ; - java.lang.String::equals@35 (line 1021) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.04% 0x00007f4b14ae24dd: mov 0xc(%r12,%r9,8),%r8d ;*getfield value ; - java.lang.String::equals@20 (line 1019) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.12% 0x00007f4b14ae24e2: mov 0xc(%r12,%rcx,8),%r10d ;*getfield value ; - java.lang.String::equals@25 (line 1020) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae24e7: cmp %edi,%r11d 0x00007f4b14ae24ea: jne 0x00007f4b14ae2585 ;*if_icmpne ; - java.lang.String::equals@38 (line 1021) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.41% 0.07% 0x00007f4b14ae24f0: mov 0xc(%r12,%r8,8),%r11d ;*arraylength ; - java.lang.String::equals@42 (line 1023) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) ; implicit exception: dispatches to 0x00007f4b14ae2631 0.29% 0.04% 0x00007f4b14ae24f5: mov 0xc(%r12,%r10,8),%r9d ;*arraylength ; - java.lang.String::equals@45 (line 1023) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) ; implicit exception: dispatches to 0x00007f4b14ae2641 0.01% 0x00007f4b14ae24fa: cmp %r9d,%r11d 0x00007f4b14ae24fd: jne 0x00007f4b14ae248b ;*if_icmpne ; - java.lang.String::equals@46 (line 1023) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.42% 0x00007f4b14ae24ff: test %r11d,%r11d 0x00007f4b14ae2502: jle 0x00007f4b14ae254e ;*if_icmpge ; - java.lang.String::equals@56 (line 1024) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.08% 0.02% 0x00007f4b14ae2504: test %r11d,%r11d 0x00007f4b14ae2507: jbe 0x00007f4b14ae2569 0.29% 0.27% 0x00007f4b14ae2509: mov %r11d,%ecx 0x00007f4b14ae250c: dec %ecx 0x00007f4b14ae250e: cmp %r11d,%ecx 0x00007f4b14ae2511: jae 0x00007f4b14ae2569 0.38% 0.51% 0x00007f4b14ae2513: test %r9d,%r9d 0x00007f4b14ae2516: jbe 0x00007f4b14ae2569 0.31% 0.14% 0x00007f4b14ae2518: cmp %r9d,%ecx 0x00007f4b14ae251b: jae 0x00007f4b14ae2569 0.35% 0x00007f4b14ae251d: shl $0x3,%r10 0x00007f4b14ae2521: shl $0x3,%r8 0.12% 0x00007f4b14ae2525: xor %ecx,%ecx 0x00007f4b14ae2527: nopw 0x0(%rax,%rax,1) ;*aload_3 ; - java.lang.String::equals@59 (line 1025) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 24.96% 26.32% 0x00007f4b14ae2530: movslq %ecx,%r9 0.02% 0.02% 0x00007f4b14ae2533: movsbl 0x10(%r8,%r9,1),%ebx ;*baload ; - java.lang.String::equals@62 (line 1025) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 23.00% 26.08% 0x00007f4b14ae2539: movsbl 0x10(%r10,%r9,1),%edi ;*baload ; - java.lang.String::equals@67 (line 1025) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 1.75% 1.92% 0x00007f4b14ae253f: cmp %edi,%ebx 0.01% 0x00007f4b14ae2541: jne 0x00007f4b14ae248f ;*if_icmpeq ; - java.lang.String::equals@68 (line 1025) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 28.80% 31.96% 0x00007f4b14ae2547: inc %ecx ;*iinc ; - java.lang.String::equals@73 (line 1024) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0.06% 0.07% 0x00007f4b14ae2549: cmp %r11d,%ecx 0x00007f4b14ae254c: jl 0x00007f4b14ae2530 ;*iconst_1 ; - java.lang.String::equals@79 (line 1029) ; - org.openjdk.strings.Equals::test@8 (line 44) ; - org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub@16 (line 204) 0x00007f4b14ae254e: mov $0x1,%edx 0x00007f4b14ae2553: jmpq 0x00007f4b14ae2491 0x00007f4b14ae2558: mov $0x1,%edx .................................................................................................... 91.44% 93.83% ....[Hottest Regions]............................................................................... 91.44% 93.83% [0x7f4b14ae248f:0x7f4b14ae2549] in org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub 4.34% 2.18% [0x7f4b14ade600:0x7f4b14ade62b] in org.openjdk.jmh.infra.Blackhole::consume 3.36% 3.32% [0x0:0x0] in 0.09% 0.01% [0x7f4b251553cd:0x7f4b251553dc] in __GI___libc_write (libc-2.19.so) 0.02% [0x7f4b0d00fbc0:0x7f4b0d00fbc8] in [unknown] (perf-32544.map) 0.02% [0x7f4b25171990:0x7f4b25171996] in pthread_cond_destroy@@GLIBC_2.3.2 (libc-2.19.so) 0.02% [0x7f4b045e32e2:0x7f4b045e32f8] in print_insn (libhsdis-amd64.so) 0.02% [0x7f4b24c537d1:0x7f4b24c537d4] in pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread-2.19.so) 0.01% [0x7f4b240a4f93:0x7f4b240a4f9f] in BlockBegin::try_merge(ValueStack*) (libjvm.so) 0.01% [0x7f4b245a5b7f:0x7f4b245a5b7f] in defaultStream::hold(long) (libjvm.so) 0.01% 0.01% [0x7f4b245a5c90:0x7f4b245a5ca2] in defaultStream::write(char const*, unsigned long) (libjvm.so) 0.01% 0.05% [0x7f4b2461c31a:0x7f4b2461c35f] in RelocIterator::set_limits(unsigned char*, unsigned char*) (libjvm.so) 0.01% 0.01% [0x7f4b24746924:0x7f4b2474692c] in xmlStream::write_text(char const*, unsigned long) (libjvm.so) 0.01% [0x7f4b2474695a:0x7f4b24746964] in xmlStream::write_text(char const*, unsigned long) (libjvm.so) 0.01% 0.01% [0x7f4b250b2fcf:0x7f4b250b2fcf] in vfprintf (libc-2.19.so) 0.01% [0x7f4b250d799e:0x7f4b250d799e] in _IO_fflush (libc-2.19.so) 0.01% 0.01% [0x7f4b250d8935:0x7f4b250d8935] in _IO_fwrite (libc-2.19.so) 0.01% 0.01% [0x7f4b25171cc4:0x7f4b25171ccf] in __libc_enable_asynccancel (libc-2.19.so) 0.01% [0x7f4b045de0bc:0x7f4b045de0bc] in putop (libhsdis-amd64.so) 0.01% [0x7f4b045de26e:0x7f4b045de26e] in oappend (libhsdis-amd64.so) 0.56% 0.57% <...other 159 warm regions...> .................................................................................................... 100.00% 99.99% ....[Hottest Methods (after inlining)].............................................................. 91.44% 93.83% org.openjdk.strings.generated.Equals_test::test_avgt_jmhStub 4.34% 2.18% org.openjdk.jmh.infra.Blackhole::consume 3.36% 3.32% 0.09% 0.01% __GI___libc_write (libc-2.19.so) 0.06% 0.02% [unknown] (perf-32544.map) 0.03% 0.01% xmlStream::write_text(char const*, unsigned long) (libjvm.so) 0.03% 0.04% print_insn (libhsdis-amd64.so) 0.03% 0.04% vfprintf (libc-2.19.so) 0.03% 0.05% _IO_fwrite (libc-2.19.so) 0.02% pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread-2.19.so) 0.02% pthread_cond_destroy@@GLIBC_2.3.2 (libc-2.19.so) 0.02% 0.01% defaultStream::write(char const*, unsigned long) (libjvm.so) 0.02% 0.01% decode_env::handle_event(char const*, unsigned char*) (libjvm.so) 0.01% 0.01% jio_print (libjvm.so) 0.01% BlockBegin::try_merge(ValueStack*) (libjvm.so) 0.01% 0.05% RelocIterator::set_limits(unsigned char*, unsigned char*) (libjvm.so) 0.01% GenericGrowableArray::raw_allocate(int) (libjvm.so) 0.01% _IO_fflush (libc-2.19.so) 0.01% 0.02% _IO_default_xsputn (libc-2.19.so) 0.01% 0.01% __libc_enable_asynccancel (libc-2.19.so) 0.42% 0.11% <...other 67 warm methods...> .................................................................................................... 100.00% 99.71% ....[Distribution by Area].......................................................................... 95.79% 96.03% 3.36% 3.32% 0.40% 0.35% 0.29% 0.21% 0.06% 0.04% 0.06% 0.02% 0.05% 0.01% 0.01% .................................................................................................... 100.00% 99.99% # Run complete. Total time: 00:00:31 Benchmark (cmp) (size) Mode Samples Score Error Units o.o.s.Equals.test 0.0 64 avgt 50 66.501 ± 0.669 ns/op o.o.s.Equals.test:@asm 0.0 64 avgt 1 NaN ± NaN ---