# JMH 1.17.5 (released 5 days ago) # VM version: JDK 1.8.0_101, VM 25.101-b13 # VM invoker: /home/shade/Install/jdk8u101/jre/bin/java # VM options: -XX:-TieredCompilation -XX:-UseBiasedLocking # Warmup: 10 iterations, 1 s each # Measurement: 5 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: org.openjdk.LockRoach.test # Run progress: 0.00% complete, ETA 00:00:15 # Fork: 1 of 1 # Preparing profilers: LinuxPerfAsmProfiler # Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console # Warmup Iteration 1: 5558.118 ns/op # Warmup Iteration 2: 5335.305 ns/op # Warmup Iteration 3: 5327.825 ns/op # Warmup Iteration 4: 5334.761 ns/op # Warmup Iteration 5: 5334.588 ns/op # Warmup Iteration 6: 5336.309 ns/op # Warmup Iteration 7: 5335.053 ns/op # Warmup Iteration 8: 5334.662 ns/op # Warmup Iteration 9: 5334.780 ns/op # Warmup Iteration 10: 5334.558 ns/op Iteration 1: 5329.663 ns/op Iteration 2: 5334.826 ns/op Iteration 3: 5335.078 ns/op Iteration 4: 5334.766 ns/op Iteration 5: 5323.749 ns/op # Processing profiler results: LinuxPerfAsmProfiler Result "org.openjdk.LockRoach.test": 5331.617 ±(99.9%) 19.051 ns/op [Average] (min, avg, max) = (5323.749, 5331.617, 5335.078), stdev = 4.948 CI (99.9%): [5312.565, 5350.668] (assumes normal distribution) Secondary result "org.openjdk.LockRoach.test:·asm": PrintAssembly processed: 45754 total address lines. Perf output processed (skipped 10.121 seconds): Column 1: cycles (5060 events) Column 2: instructions (5057 events) Hottest code regions (>10.00% "cycles" events): ....[Hottest Region 1].............................................................................. C2, org.openjdk.LockRoach::test, version 80 (789 bytes) 0x00007f455cc707b4: nopl 0x0(%rax,%rax,1) 0x00007f455cc707bc: data16 data16 xchg %ax,%ax [Verified Entry Point] 0x00007f455cc707c0: mov %eax,-0x14000(%rsp) 0x00007f455cc707c7: push %rbp 0x00007f455cc707c8: sub $0x30,%rsp ;*synchronization entry ; - org.openjdk.LockRoach::test@-1 (line 51) 0x00007f455cc707cc: mov %rsi,(%rsp) 0x00007f455cc707d0: lea 0x20(%rsp),%rbx 0x00007f455cc707d5: mov (%rsi),%rax 0.04% 0.02% 0x00007f455cc707d8: test $0x2,%rax ╭ 0x00007f455cc707de: jne 0x00007f455cc70804 │ 0x00007f455cc707e0: or $0x1,%rax │ 0x00007f455cc707e4: mov %rax,(%rbx) │ 0x00007f455cc707e7: lock cmpxchg %rbx,(%rsi) 0.08% 0.22% │╭ 0x00007f455cc707ec: je 0x00007f455cc7081d ││ 0x00007f455cc707f2: sub %rsp,%rax ││ 0x00007f455cc707f5: and $0xfffffffffffff007,%rax ││ 0x00007f455cc707fc: mov %rax,(%rbx) ││╭ 0x00007f455cc707ff: jmpq 0x00007f455cc7081d ↘││ 0x00007f455cc70804: movq $0x3,(%rbx) ││ 0x00007f455cc7080b: mov %rax,%rbx ││ 0x00007f455cc7080e: mov 0x16(%rbx),%rax ││ 0x00007f455cc70812: test %rax,%rax ││╭ 0x00007f455cc70815: jne 0x00007f455cc7081d │││ 0x00007f455cc70817: lock cmpxchg %r15,0x16(%rbx) ↘↘↘ 0x00007f455cc7081d: jne 0x00007f455cc70b1b ;*monitorenter ; - org.openjdk.LockRoach::test@12 (line 52) 0x00007f455cc70823: mov (%rsp),%r10 0x00007f455cc70827: addl $0x42,0xc(%r10) ;*monitorexit ; - org.openjdk.LockRoach::test@25 (line 54) 0x00007f455cc7082c: lea 0x20(%rsp),%rax ;*monitorenter ; - org.openjdk.LockRoach::test@12 (line 52) 0.02% 0x00007f455cc70831: mov (%rsp),%r11 0x00007f455cc70835: cmpq $0x0,(%rax) ╭ 0x00007f455cc7083c: je 0x00007f455cc708b6 │ 0x00007f455cc70842: mov (%r11),%r10 0.06% │ 0x00007f455cc70845: test $0x2,%r10 │╭ 0x00007f455cc7084c: je 0x00007f455cc708ae ││ 0x00007f455cc7084e: mov 0x16(%r10),%rax ││ 0x00007f455cc70852: xor %r15,%rax ││ 0x00007f455cc70855: or 0x26(%r10),%rax ││╭ 0x00007f455cc70859: jne 0x00007f455cc708b6 │││ 0x00007f455cc7085b: mov 0x36(%r10),%rax │││ 0x00007f455cc7085f: or 0x3e(%r10),%rax │││╭ 0x00007f455cc70863: jne 0x00007f455cc7086f ││││ 0x00007f455cc70865: movq $0x0,0x16(%r10) ││││╭ 0x00007f455cc7086d: jmp 0x00007f455cc708b6 │││↘│ 0x00007f455cc7086f: cmpq $0x0,0x46(%r10) │││ │╭ 0x00007f455cc70877: je 0x00007f455cc708a2 │││ ││ 0x00007f455cc70879: movq $0x0,0x16(%r10) │││ ││ 0x00007f455cc70881: lock addl $0x0,(%rsp) │││ ││ 0x00007f455cc70886: cmpq $0x0,0x46(%r10) │││ ││╭ 0x00007f455cc7088e: jne 0x00007f455cc708a7 │││ │││ 0x00007f455cc70890: movabs $0x0,%rax │││ │││ 0x00007f455cc7089a: lock cmpxchg %r15,0x16(%r10) │││ │││╭ 0x00007f455cc708a0: jne 0x00007f455cc708a7 │││ │↘││ 0x00007f455cc708a2: or $0x1,%eax │││ │ ││╭ 0x00007f455cc708a5: jmp 0x00007f455cc708b6 │││ │ ↘↘│ 0x00007f455cc708a7: test $0x0,%eax │││ │ │╭ 0x00007f455cc708ac: jmp 0x00007f455cc708b6 │↘│ │ ││ 0x00007f455cc708ae: mov (%rax),%r10 │ │ │ ││ 0x00007f455cc708b1: lock cmpxchg %r10,(%r11) 0.12% 0.24% ↘ ↘ ↘ ↘↘ 0x00007f455cc708b6: jne 0x00007f455cc70b31 0x00007f455cc708bc: mov $0x1,%ebp ;*aload_0 ; - org.openjdk.LockRoach::test@9 (line 52) 0.02% ↗ 0x00007f455cc708c1: lea 0x20(%rsp),%rbx │ 0x00007f455cc708c6: mov (%rsp),%r11 │ 0x00007f455cc708ca: mov (%r11),%rax 17.35% │ 0x00007f455cc708cd: test $0x2,%rax ╭ │ 0x00007f455cc708d3: jne 0x00007f455cc708f9 1.25% │ │ 0x00007f455cc708d5: or $0x1,%rax │ │ 0x00007f455cc708d9: mov %rax,(%rbx) 1.52% │ │ 0x00007f455cc708dc: lock cmpxchg %rbx,(%r11) 32.06% 39.09% │╭ │ 0x00007f455cc708e1: je 0x00007f455cc70912 ││ │ 0x00007f455cc708e7: sub %rsp,%rax ││ │ 0x00007f455cc708ea: and $0xfffffffffffff007,%rax ││ │ 0x00007f455cc708f1: mov %rax,(%rbx) ││╭ │ 0x00007f455cc708f4: jmpq 0x00007f455cc70912 ↘││ │ 0x00007f455cc708f9: movq $0x3,(%rbx) ││ │ 0x00007f455cc70900: mov %rax,%rbx ││ │ 0x00007f455cc70903: mov 0x16(%rbx),%rax ││ │ 0x00007f455cc70907: test %rax,%rax ││╭ │ 0x00007f455cc7090a: jne 0x00007f455cc70912 │││ │ 0x00007f455cc7090c: lock cmpxchg %r15,0x16(%rbx) ↘↘↘╭ │ 0x00007f455cc70912: jne 0x00007f455cc70aee ;*monitorenter │ │ ; - org.openjdk.LockRoach::test@12 (line 52) 1.17% │ │ ↗ 0x00007f455cc70918: mov (%rsp),%r10 │ │ │ 0x00007f455cc7091c: mov 0xc(%r10),%r11d ;*getfield x │ │ │ ; - org.openjdk.LockRoach::test@15 (line 53) │ │ │ 0x00007f455cc70920: mov %r11d,%r10d │ │ │ 0x00007f455cc70923: add $0x42,%r10d 1.21% │ │ │ 0x00007f455cc70927: mov (%rsp),%r8 │ │ │ 0x00007f455cc7092b: mov %r10d,0xc(%r8) │ │ │ 0x00007f455cc7092f: add $0x108,%r11d │ │ │ 0x00007f455cc70936: mov %r11d,0xc(%r8) ;*monitorexit │ │ │ ; - org.openjdk.LockRoach::test@25 (line 54) 1.34% │ │ │ 0x00007f455cc7093a: lea 0x20(%rsp),%rax ;*monitorenter │ │ │ ; - org.openjdk.LockRoach::test@12 (line 52) │ │ │ 0x00007f455cc7093f: cmpq $0x0,(%rax) │╭ │ │ 0x00007f455cc70946: je 0x00007f455cc709c0 ││ │ │ 0x00007f455cc7094c: mov (%r8),%r10 13.36% ││ │ │ 0x00007f455cc7094f: test $0x2,%r10 ││╭ │ │ 0x00007f455cc70956: je 0x00007f455cc709b8 │││ │ │ 0x00007f455cc70958: mov 0x16(%r10),%rax │││ │ │ 0x00007f455cc7095c: xor %r15,%rax │││ │ │ 0x00007f455cc7095f: or 0x26(%r10),%rax │││╭ │ │ 0x00007f455cc70963: jne 0x00007f455cc709c0 ││││ │ │ 0x00007f455cc70965: mov 0x36(%r10),%rax ││││ │ │ 0x00007f455cc70969: or 0x3e(%r10),%rax ││││╭ │ │ 0x00007f455cc7096d: jne 0x00007f455cc70979 │││││ │ │ 0x00007f455cc7096f: movq $0x0,0x16(%r10) │││││╭ │ │ 0x00007f455cc70977: jmp 0x00007f455cc709c0 ││││↘│ │ │ 0x00007f455cc70979: cmpq $0x0,0x46(%r10) ││││ │╭ │ │ 0x00007f455cc70981: je 0x00007f455cc709ac ││││ ││ │ │ 0x00007f455cc70983: movq $0x0,0x16(%r10) ││││ ││ │ │ 0x00007f455cc7098b: lock addl $0x0,(%rsp) ││││ ││ │ │ 0x00007f455cc70990: cmpq $0x0,0x46(%r10) ││││ ││╭ │ │ 0x00007f455cc70998: jne 0x00007f455cc709b1 ││││ │││ │ │ 0x00007f455cc7099a: movabs $0x0,%rax ││││ │││ │ │ 0x00007f455cc709a4: lock cmpxchg %r15,0x16(%r10) ││││ │││╭ │ │ 0x00007f455cc709aa: jne 0x00007f455cc709b1 ││││ │↘││ │ │ 0x00007f455cc709ac: or $0x1,%eax ││││ │ ││╭ │ │ 0x00007f455cc709af: jmp 0x00007f455cc709c0 ││││ │ ↘↘│ │ │ 0x00007f455cc709b1: test $0x0,%eax ││││ │ │╭│ │ 0x00007f455cc709b6: jmp 0x00007f455cc709c0 1.23% ││↘│ │ │││ │ 0x00007f455cc709b8: mov (%rax),%r10 ││ │ │ │││ │ 0x00007f455cc709bb: lock cmpxchg %r10,(%r8) 25.83% 58.24% │↘ ↘ ↘ ↘↘│ │ 0x00007f455cc709c0: jne 0x00007f455cc70b01 ;*aload_0 │ │ │ ; - org.openjdk.LockRoach::test@9 (line 52) │ │ │ 0x00007f455cc709c6: add $0x4,%ebp ;*iinc │ │ │ ; - org.openjdk.LockRoach::test@34 (line 51) 1.15% │ │ │ 0x00007f455cc709c9: cmp $0x3e5,%ebp │ ╰ │ 0x00007f455cc709cf: jl 0x00007f455cc708c1 ;*if_icmpge │ │ ; - org.openjdk.LockRoach::test@6 (line 51) │ │ 0x00007f455cc709d5: cmp $0x3e8,%ebp │ ╭ │ 0x00007f455cc709db: jge 0x00007f455cc70ae2 │ │ │ 0x00007f455cc709e1: data16 xchg %ax,%ax ;*aload_0 │ │ │ ; - org.openjdk.LockRoach::test@9 (line 52) │ │ ↗│ 0x00007f455cc709e4: lea 0x20(%rsp),%rbx │ │ ││ 0x00007f455cc709e9: mov (%rsp),%r11 │ │ ││ 0x00007f455cc709ed: mov (%r11),%rax 0.24% │ │ ││ 0x00007f455cc709f0: test $0x2,%rax │ │╭ ││ 0x00007f455cc709f6: jne 0x00007f455cc70a1c 0.02% │ ││ ││ 0x00007f455cc709f8: or $0x1,%rax │ ││ ││ 0x00007f455cc709fc: mov %rax,(%rbx) 0.02% │ ││ ││ 0x00007f455cc709ff: lock cmpxchg %rbx,(%r11) 0.26% 0.61% │ ││╭ ││ 0x00007f455cc70a04: je 0x00007f455cc70a35 │ │││ ││ 0x00007f455cc70a0a: sub %rsp,%rax │ │││ ││ 0x00007f455cc70a0d: and $0xfffffffffffff007,%rax │ │││ ││ 0x00007f455cc70a14: mov %rax,(%rbx) │ │││╭ ││ 0x00007f455cc70a17: jmpq 0x00007f455cc70a35 │ │↘││ ││ 0x00007f455cc70a1c: movq $0x3,(%rbx) │ │ ││ ││ 0x00007f455cc70a23: mov %rax,%rbx │ │ ││ ││ 0x00007f455cc70a26: mov 0x16(%rbx),%rax │ │ ││ ││ 0x00007f455cc70a2a: test %rax,%rax │ │ ││╭ ││ 0x00007f455cc70a2d: jne 0x00007f455cc70a35 │ │ │││ ││ 0x00007f455cc70a2f: lock cmpxchg %r15,0x16(%rbx) │ │ ↘↘↘ ││ 0x00007f455cc70a35: jne 0x00007f455cc70b4b ;*monitorenter │ │ ││ ; - org.openjdk.LockRoach::test@12 (line 52) │ │ ││ 0x00007f455cc70a3b: mov (%rsp),%r10 │ │ ││ 0x00007f455cc70a3f: addl $0x42,0xc(%r10) ;*monitorexit │ │ ││ ; - org.openjdk.LockRoach::test@25 (line 54) │ │ ││ 0x00007f455cc70a44: lea 0x20(%rsp),%rax ;*monitorenter │ │ ││ ; - org.openjdk.LockRoach::test@12 (line 52) 0.02% │ │ ││ 0x00007f455cc70a49: mov (%rsp),%r11 │ │ ││ 0x00007f455cc70a4d: cmpq $0x0,(%rax) │ │ ╭ ││ 0x00007f455cc70a54: je 0x00007f455cc70ace │ │ │ ││ 0x00007f455cc70a5a: mov (%r11),%r10 0.14% │ │ │ ││ 0x00007f455cc70a5d: test $0x2,%r10 │ │ │╭ ││ 0x00007f455cc70a64: je 0x00007f455cc70ac6 │ │ ││ ││ 0x00007f455cc70a66: mov 0x16(%r10),%rax │ │ ││ ││ 0x00007f455cc70a6a: xor %r15,%rax │ │ ││ ││ 0x00007f455cc70a6d: or 0x26(%r10),%rax │ │ ││╭ ││ 0x00007f455cc70a71: jne 0x00007f455cc70ace │ │ │││ ││ 0x00007f455cc70a73: mov 0x36(%r10),%rax │ │ │││ ││ 0x00007f455cc70a77: or 0x3e(%r10),%rax │ │ │││╭ ││ 0x00007f455cc70a7b: jne 0x00007f455cc70a87 │ │ ││││ ││ 0x00007f455cc70a7d: movq $0x0,0x16(%r10) │ │ ││││╭ ││ 0x00007f455cc70a85: jmp 0x00007f455cc70ace │ │ │││↘│ ││ 0x00007f455cc70a87: cmpq $0x0,0x46(%r10) │ │ │││ │╭ ││ 0x00007f455cc70a8f: je 0x00007f455cc70aba │ │ │││ ││ ││ 0x00007f455cc70a91: movq $0x0,0x16(%r10) │ │ │││ ││ ││ 0x00007f455cc70a99: lock addl $0x0,(%rsp) │ │ │││ ││ ││ 0x00007f455cc70a9e: cmpq $0x0,0x46(%r10) │ │ │││ ││╭ ││ 0x00007f455cc70aa6: jne 0x00007f455cc70abf │ │ │││ │││ ││ 0x00007f455cc70aa8: movabs $0x0,%rax │ │ │││ │││ ││ 0x00007f455cc70ab2: lock cmpxchg %r15,0x16(%r10) │ │ │││ │││╭ ││ 0x00007f455cc70ab8: jne 0x00007f455cc70abf │ │ │││ │↘││ ││ 0x00007f455cc70aba: or $0x1,%eax │ │ │││ │ ││╭ ││ 0x00007f455cc70abd: jmp 0x00007f455cc70ace │ │ │││ │ ↘↘│ ││ 0x00007f455cc70abf: test $0x0,%eax │ │ │││ │ │╭││ 0x00007f455cc70ac4: jmp 0x00007f455cc70ace 0.04% │ │ │↘│ │ ││││ 0x00007f455cc70ac6: mov (%rax),%r10 │ │ │ │ │ ││││ 0x00007f455cc70ac9: lock cmpxchg %r10,(%r11) 0.28% 0.47% │ │ ↘ ↘ ↘ ↘↘││ 0x00007f455cc70ace: jne 0x00007f455cc70b5d ;*monitorexit │ │ ││ ; - org.openjdk.LockRoach::test@25 (line 54) │ │ ││ 0x00007f455cc70ad4: inc %ebp ;*iinc │ │ ││ ; - org.openjdk.LockRoach::test@34 (line 51) │ │ ││ 0x00007f455cc70ad6: cmp $0x3e8,%ebp │ │ ╰│ 0x00007f455cc70adc: jl 0x00007f455cc709e4 ;*monitorexit │ │ │ ; - org.openjdk.LockRoach::test@25 (line 54) │ ↘ │ 0x00007f455cc70ae2: add $0x30,%rsp │ │ 0x00007f455cc70ae6: pop %rbp │ │ 0x00007f455cc70ae7: test %eax,0xa10f513(%rip) # 0x00007f4566d80000 │ │ ; {poll_return} 0.02% │ │ 0x00007f455cc70aed: retq ↘ │ 0x00007f455cc70aee: mov %r11,%rsi │ 0x00007f455cc70af1: lea 0x20(%rsp),%rdx │ 0x00007f455cc70af6: nop │ 0x00007f455cc70af7: callq 0x00007f455cc40260 ; OopMap{[0]=Oop off=860} │ ;*monitorenter │ ; - org.openjdk.LockRoach::test@12 (line 52) │ ; {runtime_call} ╰ 0x00007f455cc70afc: jmpq 0x00007f455cc70918 0x00007f455cc70b01: mov %r8,%rdi .................................................................................................... 98.81% 98.89% ....[Hottest Regions]............................................................................... 98.81% 98.89% C2 org.openjdk.LockRoach::test, version 80 (789 bytes) 1.07% 1.09% kernel [unknown] (0 bytes) 0.06% interpreter method entry point (kind = zerolocals) (154 bytes) 0.02% interpreter ifnull 198 ifnull (0 bytes) 0.02% libjvm.so java_lang_Thread::set_thread_status (0 bytes) 0.02% interpreter fast_aputfield 211 fast_aputfield (0 bytes) .................................................................................................... 99.98% 100.00% ....[Hottest Methods (after inlining)].............................................................. 98.81% 98.89% C2 org.openjdk.LockRoach::test, version 80 1.07% 1.09% kernel [unknown] 0.06% interpreter method entry point (kind = zerolocals) 0.02% interpreter ifnull 198 ifnull 0.02% libjvm.so java_lang_Thread::set_thread_status .................................................................................................... 99.98% 99.98% ....[Distribution by Source]........................................................................ 98.81% 98.89% C2 1.07% 1.09% kernel 0.08% 0.02% interpreter 0.02% libjvm.so .................................................................................................... 99.98% 100.00% # Run complete. Total time: 00:00:16 Benchmark Mode Cnt Score Error Units LockRoach.test avgt 5 5331.617 ± 19.051 ns/op LockRoach.test:·asm avgt NaN ---