Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CompilerOracle: print *Main.seriousLoop
Compiled method (c1) 72 46 % 3 Main::seriousLoop @ 4 (25 bytes)
total in heap [0x0000000108d24210,0x0000000108d246a8] = 1176
relocation [0x0000000108d24330,0x0000000108d24368] = 56
main code [0x0000000108d24380,0x0000000108d24520] = 416
stub code [0x0000000108d24520,0x0000000108d245b0] = 144
oops [0x0000000108d245b0,0x0000000108d245b8] = 8
metadata [0x0000000108d245b8,0x0000000108d245c0] = 8
scopes data [0x0000000108d245c0,0x0000000108d24600] = 64
scopes pcs [0x0000000108d24600,0x0000000108d246a0] = 160
dependencies [0x0000000108d246a0,0x0000000108d246a8] = 8
Loaded disassembler from hsdis-amd64.dylib
Decoding compiled method 0x0000000108d24210:
Code:
[Disassembling for mach='i386:x86-64']
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main'
0x0000000108d24380: mov %eax,-0x14000(%rsp)
0x0000000108d24387: push %rbp
0x0000000108d24388: sub $0x40,%rsp
0x0000000108d2438c: movabs $0x122180660,%rsi ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24396: mov 0x64(%rsi),%edi
0x0000000108d24399: add $0x8,%edi
0x0000000108d2439c: mov %edi,0x64(%rsi)
0x0000000108d2439f: movabs $0x122180390,%rsi ; {metadata({method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d243a9: and $0x1ff8,%edi
0x0000000108d243af: cmp $0x0,%edi
0x0000000108d243b2: je 0x0000000108d244b6 ;*lconst_0
; - Main::seriousLoop@0 (line 4)
0x0000000108d243b8: movabs $0x0,%rsi
0x0000000108d243c2: movabs $0x0,%rdi
0x0000000108d243cc: jmpq 0x0000000108d2442a ;*lload_2
; - Main::seriousLoop@4 (line 5)
0x0000000108d243d1: nopl 0x0(%rax)
0x0000000108d243d8: add %rsi,%rdi
0x0000000108d243db: movabs $0x1,%r10
0x0000000108d243e5: add %r10,%rsi
0x0000000108d243e8: movabs $0x122180660,%rax ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d243f2: mov 0x68(%rax),%ebx
0x0000000108d243f5: add $0x8,%ebx
0x0000000108d243f8: mov %ebx,0x68(%rax)
0x0000000108d243fb: movabs $0x122180390,%rax ; {metadata({method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24405: and $0xfff8,%ebx
0x0000000108d2440b: cmp $0x0,%ebx
0x0000000108d2440e: je 0x0000000108d244cd ; OopMap{off=148}
;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d24414: test %eax,-0x232a31a(%rip) # 0x00000001069fa100
; {poll}
0x0000000108d2441a: movabs $0x122180660,%rax ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24424: incl 0xb0(%rax) ;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d2442a: movabs $0x5f5e100,%rax
0x0000000108d24434: cmp %rsi,%rax
0x0000000108d24437: movabs $0x122180660,%rax ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24441: movabs $0xa0,%rbx
0x0000000108d2444b: jge 0x0000000108d2445b
0x0000000108d24451: movabs $0x90,%rbx
0x0000000108d2445b: mov (%rax,%rbx,1),%rdx
0x0000000108d2445f: lea 0x1(%rdx),%rdx
0x0000000108d24463: mov %rdx,(%rax,%rbx,1)
0x0000000108d24467: jge 0x0000000108d243d8 ;*lcmp
; - Main::seriousLoop@8 (line 5)
0x0000000108d2446d: mov %rdi,%rax
0x0000000108d24470: add $0x40,%rsp
0x0000000108d24474: pop %rbp
0x0000000108d24475: test %eax,-0x232a37b(%rip) # 0x00000001069fa100
; {poll_return}
0x0000000108d2447b: retq ;*lreturn
; - Main::seriousLoop@24 (line 9)
0x0000000108d2447c: mov %eax,-0x14000(%rsp)
0x0000000108d24483: push %rbp
0x0000000108d24484: sub $0x40,%rsp
0x0000000108d24488: mov 0x10(%rsi),%rbx
0x0000000108d2448c: mov (%rsi),%rax
0x0000000108d2448f: mov %rsi,%rdi
0x0000000108d24492: mov %rbx,0x30(%rsp)
0x0000000108d24497: mov %rax,0x28(%rsp)
0x0000000108d2449c: callq 0x0000000107ead3d4 ; {runtime_call}
0x0000000108d244a1: mov 0x28(%rsp),%rax
0x0000000108d244a6: mov %rax,%rsi
0x0000000108d244a9: mov 0x30(%rsp),%rbx
0x0000000108d244ae: mov %rbx,%rdi
0x0000000108d244b1: jmpq 0x0000000108d2442a
0x0000000108d244b6: mov %rsi,0x8(%rsp)
0x0000000108d244bb: movq $0xffffffffffffffff,(%rsp)
0x0000000108d244c3: callq 0x0000000108cfe8e0 ; OopMap{off=328}
;*synchronization entry
; - Main::seriousLoop@-1 (line 4)
; {runtime_call}
0x0000000108d244c8: jmpq 0x0000000108d243b8
0x0000000108d244cd: mov %rax,0x8(%rsp)
0x0000000108d244d2: movq $0x14,(%rsp)
0x0000000108d244da: callq 0x0000000108cfe8e0 ; OopMap{off=351}
;*goto
; - Main::seriousLoop@20 (line 5)
; {runtime_call}
0x0000000108d244df: jmpq 0x0000000108d24414
0x0000000108d244e4: nop
0x0000000108d244e5: nop
0x0000000108d244e6: mov 0x288(%r15),%rax
0x0000000108d244ed: movabs $0x0,%r10
0x0000000108d244f7: mov %r10,0x288(%r15)
0x0000000108d244fe: movabs $0x0,%r10
0x0000000108d24508: mov %r10,0x290(%r15)
0x0000000108d2450f: add $0x40,%rsp
0x0000000108d24513: pop %rbp
0x0000000108d24514: jmpq 0x0000000108c6cca0 ; {runtime_call}
0x0000000108d24519: hlt
0x0000000108d2451a: hlt
0x0000000108d2451b: hlt
0x0000000108d2451c: hlt
0x0000000108d2451d: hlt
0x0000000108d2451e: hlt
0x0000000108d2451f: hlt
[Exception Handler]
[Stub Code]
0x0000000108d24520: callq 0x0000000108cfc020 ; {no_reloc}
0x0000000108d24525: mov %rsp,-0x28(%rsp)
0x0000000108d2452a: sub $0x80,%rsp
0x0000000108d24531: mov %rax,0x78(%rsp)
0x0000000108d24536: mov %rcx,0x70(%rsp)
0x0000000108d2453b: mov %rdx,0x68(%rsp)
0x0000000108d24540: mov %rbx,0x60(%rsp)
0x0000000108d24545: mov %rbp,0x50(%rsp)
0x0000000108d2454a: mov %rsi,0x48(%rsp)
0x0000000108d2454f: mov %rdi,0x40(%rsp)
0x0000000108d24554: mov %r8,0x38(%rsp)
0x0000000108d24559: mov %r9,0x30(%rsp)
0x0000000108d2455e: mov %r10,0x28(%rsp)
0x0000000108d24563: mov %r11,0x20(%rsp)
0x0000000108d24568: mov %r12,0x18(%rsp)
0x0000000108d2456d: mov %r13,0x10(%rsp)
0x0000000108d24572: mov %r14,0x8(%rsp)
0x0000000108d24577: mov %r15,(%rsp)
0x0000000108d2457b: movabs $0x107f947f2,%rdi ; {external_word}
0x0000000108d24585: movabs $0x108d24525,%rsi ; {internal_word}
0x0000000108d2458f: mov %rsp,%rdx
0x0000000108d24592: and $0xfffffffffffffff0,%rsp
0x0000000108d24596: callq 0x0000000107dd5c98 ; {runtime_call}
0x0000000108d2459b: hlt
[Deopt Handler Code]
0x0000000108d2459c: movabs $0x108d2459c,%r10 ; {section_word}
0x0000000108d245a6: push %r10
0x0000000108d245a8: jmpq 0x0000000108c47d00 ; {runtime_call}
0x0000000108d245ad: hlt
0x0000000108d245ae: hlt
0x0000000108d245af: hlt
OopMapSet contains 3 OopMaps
#0
OopMap{off=148}
#1
OopMap{off=328}
#2
OopMap{off=351}
Compiled method (c1) 85 47 3 Main::seriousLoop (25 bytes)
total in heap [0x0000000108d246d0,0x0000000108d24b10] = 1088
relocation [0x0000000108d247f0,0x0000000108d24828] = 56
main code [0x0000000108d24840,0x0000000108d249a0] = 352
stub code [0x0000000108d249a0,0x0000000108d24a30] = 144
oops [0x0000000108d24a30,0x0000000108d24a38] = 8
metadata [0x0000000108d24a38,0x0000000108d24a40] = 8
scopes data [0x0000000108d24a40,0x0000000108d24a78] = 56
scopes pcs [0x0000000108d24a78,0x0000000108d24b08] = 144
dependencies [0x0000000108d24b08,0x0000000108d24b10] = 8
Decoding compiled method 0x0000000108d246d0:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main'
# [sp+0x40] (sp of caller)
0x0000000108d24840: mov %eax,-0x14000(%rsp)
0x0000000108d24847: push %rbp
0x0000000108d24848: sub $0x30,%rsp
0x0000000108d2484c: movabs $0x122180660,%rax ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24856: mov 0x64(%rax),%esi
0x0000000108d24859: add $0x8,%esi
0x0000000108d2485c: mov %esi,0x64(%rax)
0x0000000108d2485f: movabs $0x122180390,%rax ; {metadata({method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24869: and $0x1ff8,%esi
0x0000000108d2486f: cmp $0x0,%esi
0x0000000108d24872: je 0x0000000108d2493c ;*lconst_0
; - Main::seriousLoop@0 (line 4)
0x0000000108d24878: movabs $0x0,%rax
0x0000000108d24882: movabs $0x0,%rsi
0x0000000108d2488c: jmpq 0x0000000108d248ea ;*lload_2
; - Main::seriousLoop@4 (line 5)
0x0000000108d24891: nopl 0x0(%rax)
0x0000000108d24898: add %rax,%rsi
0x0000000108d2489b: movabs $0x1,%r10
0x0000000108d248a5: add %r10,%rax
0x0000000108d248a8: movabs $0x122180660,%rdi ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d248b2: mov 0x68(%rdi),%ebx
0x0000000108d248b5: add $0x8,%ebx
0x0000000108d248b8: mov %ebx,0x68(%rdi)
0x0000000108d248bb: movabs $0x122180390,%rdi ; {metadata({method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d248c5: and $0xfff8,%ebx
0x0000000108d248cb: cmp $0x0,%ebx
0x0000000108d248ce: je 0x0000000108d24953 ; OopMap{off=148}
;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d248d4: test %eax,-0x232a7da(%rip) # 0x00000001069fa100
; {poll}
0x0000000108d248da: movabs $0x122180660,%rdi ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d248e4: incl 0xb0(%rdi) ;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d248ea: movabs $0x5f5e100,%rdi
0x0000000108d248f4: cmp %rax,%rdi
0x0000000108d248f7: movabs $0x122180660,%rdi ; {metadata(method data for {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main')}
0x0000000108d24901: movabs $0xa0,%rbx
0x0000000108d2490b: jge 0x0000000108d2491b
0x0000000108d24911: movabs $0x90,%rbx
0x0000000108d2491b: mov (%rdi,%rbx,1),%rdx
0x0000000108d2491f: lea 0x1(%rdx),%rdx
0x0000000108d24923: mov %rdx,(%rdi,%rbx,1)
0x0000000108d24927: jge 0x0000000108d24898 ;*lcmp
; - Main::seriousLoop@8 (line 5)
0x0000000108d2492d: mov %rsi,%rax
0x0000000108d24930: add $0x30,%rsp
0x0000000108d24934: pop %rbp
0x0000000108d24935: test %eax,-0x232a83b(%rip) # 0x00000001069fa100
; {poll_return}
0x0000000108d2493b: retq
0x0000000108d2493c: mov %rax,0x8(%rsp)
0x0000000108d24941: movq $0xffffffffffffffff,(%rsp)
0x0000000108d24949: callq 0x0000000108cfe8e0 ; OopMap{off=270}
;*synchronization entry
; - Main::seriousLoop@-1 (line 4)
; {runtime_call}
0x0000000108d2494e: jmpq 0x0000000108d24878
0x0000000108d24953: mov %rdi,0x8(%rsp)
0x0000000108d24958: movq $0x14,(%rsp)
0x0000000108d24960: callq 0x0000000108cfe8e0 ; OopMap{off=293}
;*goto
; - Main::seriousLoop@20 (line 5)
; {runtime_call}
0x0000000108d24965: jmpq 0x0000000108d248d4
0x0000000108d2496a: nop
0x0000000108d2496b: nop
0x0000000108d2496c: mov 0x288(%r15),%rax
0x0000000108d24973: movabs $0x0,%r10
0x0000000108d2497d: mov %r10,0x288(%r15)
0x0000000108d24984: movabs $0x0,%r10
0x0000000108d2498e: mov %r10,0x290(%r15)
0x0000000108d24995: add $0x30,%rsp
0x0000000108d24999: pop %rbp
0x0000000108d2499a: jmpq 0x0000000108c6cca0 ; {runtime_call}
0x0000000108d2499f: hlt
[Exception Handler]
[Stub Code]
0x0000000108d249a0: callq 0x0000000108cfc020 ; {no_reloc}
0x0000000108d249a5: mov %rsp,-0x28(%rsp)
0x0000000108d249aa: sub $0x80,%rsp
0x0000000108d249b1: mov %rax,0x78(%rsp)
0x0000000108d249b6: mov %rcx,0x70(%rsp)
0x0000000108d249bb: mov %rdx,0x68(%rsp)
0x0000000108d249c0: mov %rbx,0x60(%rsp)
0x0000000108d249c5: mov %rbp,0x50(%rsp)
0x0000000108d249ca: mov %rsi,0x48(%rsp)
0x0000000108d249cf: mov %rdi,0x40(%rsp)
0x0000000108d249d4: mov %r8,0x38(%rsp)
0x0000000108d249d9: mov %r9,0x30(%rsp)
0x0000000108d249de: mov %r10,0x28(%rsp)
0x0000000108d249e3: mov %r11,0x20(%rsp)
0x0000000108d249e8: mov %r12,0x18(%rsp)
0x0000000108d249ed: mov %r13,0x10(%rsp)
0x0000000108d249f2: mov %r14,0x8(%rsp)
0x0000000108d249f7: mov %r15,(%rsp)
0x0000000108d249fb: movabs $0x107f947f2,%rdi ; {external_word}
0x0000000108d24a05: movabs $0x108d249a5,%rsi ; {internal_word}
0x0000000108d24a0f: mov %rsp,%rdx
0x0000000108d24a12: and $0xfffffffffffffff0,%rsp
0x0000000108d24a16: callq 0x0000000107dd5c98 ; {runtime_call}
0x0000000108d24a1b: hlt
[Deopt Handler Code]
0x0000000108d24a1c: movabs $0x108d24a1c,%r10 ; {section_word}
0x0000000108d24a26: push %r10
0x0000000108d24a28: jmpq 0x0000000108c47d00 ; {runtime_call}
0x0000000108d24a2d: hlt
0x0000000108d24a2e: hlt
0x0000000108d24a2f: hlt
OopMapSet contains 3 OopMaps
#0
OopMap{off=148}
#1
OopMap{off=270}
#2
OopMap{off=293}
Compiled method (c2) 87 48 % 4 Main::seriousLoop @ 4 (25 bytes)
total in heap [0x0000000108d277d0,0x0000000108d27a50] = 640
relocation [0x0000000108d278f0,0x0000000108d27900] = 16
main code [0x0000000108d27900,0x0000000108d27980] = 128
stub code [0x0000000108d27980,0x0000000108d27998] = 24
oops [0x0000000108d27998,0x0000000108d279a0] = 8
metadata [0x0000000108d279a0,0x0000000108d279a8] = 8
scopes data [0x0000000108d279a8,0x0000000108d279d8] = 48
scopes pcs [0x0000000108d279d8,0x0000000108d27a48] = 112
dependencies [0x0000000108d27a48,0x0000000108d27a50] = 8
Decoding compiled method 0x0000000108d277d0:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000122180390} 'seriousLoop' '()J' in 'Main'
0x0000000108d27900: callq 0x0000000107e53ae4 ; {runtime_call}
0x0000000108d27905: data32 data32 nopw 0x0(%rax,%rax,1)
0x0000000108d27910: sub $0x18,%rsp
0x0000000108d27917: mov %rbp,0x10(%rsp)
0x0000000108d2791c: mov (%rsi),%rbx
0x0000000108d2791f: mov 0x10(%rsi),%rbp
0x0000000108d27923: mov %rsi,%rdi
0x0000000108d27926: movabs $0x107ead3d4,%r10
0x0000000108d27930: callq *%r10 ;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d27933: jmp 0x0000000108d2794d
0x0000000108d27935: data32 data32 nopw 0x0(%rax,%rax,1)
0x0000000108d27940: add %rbx,%rbp ;*ladd
; - Main::seriousLoop@14 (line 6)
0x0000000108d27943: add $0x1,%rbx ; OopMap{off=71}
;*goto
; - Main::seriousLoop@20 (line 5)
0x0000000108d27947: test %eax,-0x232d94d(%rip) # 0x00000001069fa000
;*lload_2
; - Main::seriousLoop@4 (line 5)
; {poll}
0x0000000108d2794d: cmp $0x5f5e100,%rbx
0x0000000108d27954: jle 0x0000000108d27940 ;*ifgt
; - Main::seriousLoop@9 (line 5)
0x0000000108d27956: mov %rbp,%rax
0x0000000108d27959: add $0x10,%rsp
0x0000000108d2795d: pop %rbp
0x0000000108d2795e: test %eax,-0x232d964(%rip) # 0x00000001069fa000
; {poll_return}
0x0000000108d27964: retq
0x0000000108d27965: hlt
0x0000000108d27966: hlt
0x0000000108d27967: hlt
0x0000000108d27968: hlt
0x0000000108d27969: hlt
0x0000000108d2796a: hlt
0x0000000108d2796b: hlt
0x0000000108d2796c: hlt
0x0000000108d2796d: hlt
0x0000000108d2796e: hlt
0x0000000108d2796f: hlt
0x0000000108d27970: hlt
0x0000000108d27971: hlt
0x0000000108d27972: hlt
0x0000000108d27973: hlt
0x0000000108d27974: hlt
0x0000000108d27975: hlt
0x0000000108d27976: hlt
0x0000000108d27977: hlt
0x0000000108d27978: hlt
0x0000000108d27979: hlt
0x0000000108d2797a: hlt
0x0000000108d2797b: hlt
0x0000000108d2797c: hlt
0x0000000108d2797d: hlt
0x0000000108d2797e: hlt
0x0000000108d2797f: hlt
[Exception Handler]
[Stub Code]
0x0000000108d27980: jmpq 0x0000000108c6cf60 ; {no_reloc}
[Deopt Handler Code]
0x0000000108d27985: callq 0x0000000108d2798a
0x0000000108d2798a: subq $0x5,(%rsp)
0x0000000108d2798f: jmpq 0x0000000108c47d00 ; {runtime_call}
0x0000000108d27994: hlt
0x0000000108d27995: hlt
0x0000000108d27996: hlt
0x0000000108d27997: hlt
OopMapSet contains 1 OopMaps
#0
OopMap{off=71}
Result : 5000000050000000
Time taken : 44438000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.