java -Xcomp -XX:CompileOnly=SynchronizationExample.synchronizedMethodGet -XX:CompileOnly=SynchronizationExample.synchronizedBlockGet -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly SynchronizationExample 1 s b SynchronizationExample::synchronizedMethodGet (5 bytes) Loaded disassembler from hsdis-i386.dll Decoding compiled method 0x026268c8: Code: [Disassembling for mach='i386'] [Entry Point] 0x026269a0: nop 0x026269a1: nop 0x026269a2: nop 0x026269a3: nop 0x026269a4: nop 0x026269a5: nop 0x026269a6: nop 0x026269a7: cmp 0x4(%ecx),%eax 0x026269aa: jne 0x025dcd10 ; {runtime_call} [Verified Entry Point] 0x026269b0: mov %eax,0xffffd000(%esp) 0x026269b7: push %ebp 0x026269b8: mov %esp,%ebp 0x026269ba: sub $0x28,%esp 0x026269bd: lea 0x10(%esp),%esi 0x026269c1: mov %ecx,0x4(%esi) 0x026269c4: mov (%ecx),%eax 0x026269c6: mov %eax,%edi 0x026269c8: and $0x7,%edi 0x026269cb: cmp $0x5,%edi 0x026269ce: jne 0x02626a5a 0x026269d4: mov %eax,(%esi) 0x026269d6: mov %fs:0x0,%edi 0x026269de: mov 0xfffffff4(%edi),%edi 0x026269e1: xor %edi,%eax 0x026269e3: mov 0x4(%ecx),%edi 0x026269e6: xor 0x68(%edi),%eax 0x026269e9: and $0xffffff87,%eax 0x026269ec: je 0x02626a7b 0x026269f2: test $0x7,%eax 0x026269f7: jne 0x02626a4e 0x026269fd: test $0x180,%eax 0x02626a02: jne 0x02626a2c 0x02626a08: mov (%esi),%eax 0x02626a0a: and $0x1ff,%eax 0x02626a10: mov %fs:0x0,%edi 0x02626a18: mov 0xfffffff4(%edi),%edi 0x02626a1b: or %eax,%edi 0x02626a1d: lock cmpxchg %edi,(%ecx) 0x02626a21: jne 0x02626b0b 0x02626a27: jmp 0x02626a7b 0x02626a2c: mov %fs:0x0,%edi 0x02626a34: mov 0xfffffff4(%edi),%edi 0x02626a37: mov 0x4(%ecx),%eax 0x02626a3a: or 0x68(%eax),%edi 0x02626a3d: mov (%esi),%eax 0x02626a3f: lock cmpxchg %edi,(%ecx) 0x02626a43: jne 0x02626b0b 0x02626a49: jmp 0x02626a7b 0x02626a4e: mov (%esi),%eax 0x02626a50: mov 0x4(%ecx),%edi 0x02626a53: mov 0x68(%edi),%edi 0x02626a56: lock cmpxchg %edi,(%ecx) 0x02626a5a: mov (%ecx),%eax 0x02626a5c: or $0x1,%eax 0x02626a5f: mov %eax,(%esi) 0x02626a61: lock cmpxchg %esi,(%ecx) 0x02626a65: je 0x02626a7b 0x02626a6b: sub %esp,%eax 0x02626a6d: and $0xfffff003,%eax 0x02626a73: mov %eax,(%esi) 0x02626a75: jne 0x02626b0b 0x02626a7b: mov 0x8(%ecx),%esi 0x02626a7e: lea 0x10(%esp),%eax 0x02626a82: mov 0x4(%eax),%ebx 0x02626a85: mov (%ebx),%edi 0x02626a87: and $0x7,%edi 0x02626a8a: cmp $0x5,%edi 0x02626a8d: je 0x02626aa7 0x02626a93: mov (%eax),%edi 0x02626a95: test %edi,%edi 0x02626a97: je 0x02626aa7 0x02626a9d: lock cmpxchg %edi,(%ebx) 0x02626aa1: jne 0x02626b1c 0x02626aa7: mov %esi,%eax 0x02626aa9: mov %ebp,%esp 0x02626aab: pop %ebp 0x02626aac: test %eax,0x250100 ; {poll_return} 0x02626ab2: ret 0x02626ab3: mov %fs:0x0,%esi 0x02626abb: mov 0xfffffff4(%esi),%esi 0x02626abe: mov 0x168(%esi),%eax 0x02626ac4: movl $0x0,0x168(%esi) 0x02626ace: movl $0x0,0x16c(%esi) 0x02626ad8: mov %eax,%esi 0x02626ada: lea 0x10(%esp),%eax 0x02626ade: mov 0x4(%eax),%ebx 0x02626ae1: mov (%ebx),%edi 0x02626ae3: and $0x7,%edi 0x02626ae6: cmp $0x5,%edi 0x02626ae9: je 0x02626b03 0x02626aef: mov (%eax),%edi 0x02626af1: test %edi,%edi 0x02626af3: je 0x02626b03 0x02626af9: lock cmpxchg %edi,(%ebx) 0x02626afd: jne 0x02626b2d 0x02626b03: mov %esi,%eax 0x02626b05: call 0x025ef490 ; {runtime_call} 0x02626b0a: nop 0x02626b0b: mov %ecx,0x4(%esp) 0x02626b0f: mov %esi,(%esp) 0x02626b12: call 0x02625e50 ; OopMap{ecx=Oop [20]=Oop off=375} ;*synchronization entry ; - SynchronizationExample::synchronizedMethodGet@-1 (line 5) ; {runtime_call} 0x02626b17: jmp 0x02626a7b 0x02626b1c: lea 0x10(%esp),%eax 0x02626b20: mov %eax,(%esp) 0x02626b23: call 0x02626050 ; {runtime_call} 0x02626b28: jmp 0x02626aa7 0x02626b2d: lea 0x10(%esp),%eax 0x02626b31: mov %eax,(%esp) 0x02626b34: call 0x02626050 ; {runtime_call} 0x02626b39: jmp 0x02626b03 0x02626b3b: nop 0x02626b3c: nop 0x02626b3d: hlt 0x02626b3e: hlt 0x02626b3f: hlt [Exception Handler] [Stub Code] 0x02626b40: call 0x02625690 ; {no_reloc} 0x02626b45: mov %eax,0x8(%esp) 0x02626b49: lea 0x10(%esp),%eax 0x02626b4d: mov 0x4(%eax),%ebx 0x02626b50: mov (%ebx),%ecx 0x02626b52: and $0x7,%ecx 0x02626b55: cmp $0x5,%ecx 0x02626b58: je 0x02626b72 0x02626b5e: mov (%eax),%ecx 0x02626b60: test %ecx,%ecx 0x02626b62: je 0x02626b72 0x02626b68: lock cmpxchg %ecx,(%ebx) 0x02626b6c: jne 0x02626b72 0x02626b72: mov 0x8(%esp),%eax 0x02626b76: jmp 0x025ef490 ; {runtime_call} 0x02626b7b: push $0x2626b7b ; {section_word} 0x02626b80: jmp 0x025dda10 ; {runtime_call} [Constants] 0x02626b85: add %al,(%eax) 0x02626b87: .byte 0x0 2 !b SynchronizationExample::synchronizedBlockGet (16 bytes) Decoding compiled method 0x02626c08: Code: [Disassembling for mach='i386'] [Entry Point] 0x02626ce0: nop 0x02626ce1: nop 0x02626ce2: nop 0x02626ce3: nop 0x02626ce4: nop 0x02626ce5: nop 0x02626ce6: nop 0x02626ce7: cmp 0x4(%ecx),%eax 0x02626cea: jne 0x025dcd10 ; {runtime_call} [Verified Entry Point] 0x02626cf0: mov %eax,0xffffd000(%esp) 0x02626cf7: push %ebp 0x02626cf8: mov %esp,%ebp 0x02626cfa: sub $0x28,%esp 0x02626cfd: lea 0x10(%esp),%esi 0x02626d01: mov %ecx,0x4(%esi) 0x02626d04: mov (%ecx),%eax 0x02626d06: mov %eax,%edi 0x02626d08: and $0x7,%edi 0x02626d0b: cmp $0x5,%edi 0x02626d0e: jne 0x02626d9a 0x02626d14: mov %eax,(%esi) 0x02626d16: mov %fs:0x0,%edi 0x02626d1e: mov 0xfffffff4(%edi),%edi 0x02626d21: xor %edi,%eax 0x02626d23: mov 0x4(%ecx),%edi 0x02626d26: xor 0x68(%edi),%eax 0x02626d29: and $0xffffff87,%eax 0x02626d2c: je 0x02626dbb 0x02626d32: test $0x7,%eax 0x02626d37: jne 0x02626d8e 0x02626d3d: test $0x180,%eax 0x02626d42: jne 0x02626d6c 0x02626d48: mov (%esi),%eax 0x02626d4a: and $0x1ff,%eax 0x02626d50: mov %fs:0x0,%edi 0x02626d58: mov 0xfffffff4(%edi),%edi 0x02626d5b: or %eax,%edi 0x02626d5d: lock cmpxchg %edi,(%ecx) 0x02626d61: jne 0x02626e4b 0x02626d67: jmp 0x02626dbb 0x02626d6c: mov %fs:0x0,%edi 0x02626d74: mov 0xfffffff4(%edi),%edi 0x02626d77: mov 0x4(%ecx),%eax 0x02626d7a: or 0x68(%eax),%edi 0x02626d7d: mov (%esi),%eax 0x02626d7f: lock cmpxchg %edi,(%ecx) 0x02626d83: jne 0x02626e4b 0x02626d89: jmp 0x02626dbb 0x02626d8e: mov (%esi),%eax 0x02626d90: mov 0x4(%ecx),%edi 0x02626d93: mov 0x68(%edi),%edi 0x02626d96: lock cmpxchg %edi,(%ecx) 0x02626d9a: mov (%ecx),%eax 0x02626d9c: or $0x1,%eax 0x02626d9f: mov %eax,(%esi) 0x02626da1: lock cmpxchg %esi,(%ecx) 0x02626da5: je 0x02626dbb 0x02626dab: sub %esp,%eax 0x02626dad: and $0xfffff003,%eax 0x02626db3: mov %eax,(%esi) 0x02626db5: jne 0x02626e4b 0x02626dbb: mov 0x8(%ecx),%esi 0x02626dbe: lea 0x10(%esp),%eax 0x02626dc2: mov 0x4(%eax),%ebx 0x02626dc5: mov (%ebx),%edi 0x02626dc7: and $0x7,%edi 0x02626dca: cmp $0x5,%edi 0x02626dcd: je 0x02626de7 0x02626dd3: mov (%eax),%edi 0x02626dd5: test %edi,%edi 0x02626dd7: je 0x02626de7 0x02626ddd: lock cmpxchg %edi,(%ebx) 0x02626de1: jne 0x02626e5c 0x02626de7: mov %esi,%eax 0x02626de9: mov %ebp,%esp 0x02626deb: pop %ebp 0x02626dec: test %eax,0x250100 ; {poll_return} 0x02626df2: ret 0x02626df3: mov %fs:0x0,%esi 0x02626dfb: mov 0xfffffff4(%esi),%esi 0x02626dfe: mov 0x168(%esi),%eax 0x02626e04: movl $0x0,0x168(%esi) 0x02626e0e: movl $0x0,0x16c(%esi) 0x02626e18: mov %eax,%esi 0x02626e1a: lea 0x10(%esp),%eax 0x02626e1e: mov 0x4(%eax),%ebx 0x02626e21: mov (%ebx),%edi 0x02626e23: and $0x7,%edi 0x02626e26: cmp $0x5,%edi 0x02626e29: je 0x02626e43 0x02626e2f: mov (%eax),%edi 0x02626e31: test %edi,%edi 0x02626e33: je 0x02626e43 0x02626e39: lock cmpxchg %edi,(%ebx) 0x02626e3d: jne 0x02626e6d 0x02626e43: mov %esi,%eax 0x02626e45: call 0x025ef490 ; {runtime_call} 0x02626e4a: nop 0x02626e4b: mov %ecx,0x4(%esp) 0x02626e4f: mov %esi,(%esp) 0x02626e52: call 0x02625e50 ; OopMap{ecx=Oop [20]=Oop off=375} ;*monitorenter ; - SynchronizationExample::synchronizedBlockGet@3 (line 9) ; {runtime_call} 0x02626e57: jmp 0x02626dbb 0x02626e5c: lea 0x10(%esp),%eax 0x02626e60: mov %eax,(%esp) 0x02626e63: call 0x02626050 ; {runtime_call} 0x02626e68: jmp 0x02626de7 0x02626e6d: lea 0x10(%esp),%eax 0x02626e71: mov %eax,(%esp) 0x02626e74: call 0x02626050 ; {runtime_call} 0x02626e79: jmp 0x02626e43 0x02626e7b: nop 0x02626e7c: nop 0x02626e7d: hlt 0x02626e7e: hlt 0x02626e7f: hlt [Exception Handler] [Stub Code] 0x02626e80: call 0x02625690 ; {no_reloc} 0x02626e85: jmp 0x025ef490 ; {runtime_call} 0x02626e8a: push $0x2626e8a ; {section_word} 0x02626e8f: jmp 0x025dda10 ; {runtime_call}