Skip to content

Instantly share code, notes, and snippets.

@arnaudroger
Last active January 30, 2019 17:24
Show Gist options
  • Save arnaudroger/a9bbe79adf1142538f5f845b472fb634 to your computer and use it in GitHub Desktop.
Save arnaudroger/a9bbe79adf1142538f5f845b472fb634 to your computer and use it in GitHub Desktop.
# {method} {0x00000001206a6320} 'poll' '()Ljava/lang/Object;' in 'org/jctools/queues/BaseMpscLinkedArrayQueue'
# [sp+0x30] (sp of caller)
[Entry Point]
0x0000000108427ee0: mov 0x8(%rsi),%r10d
0x0000000108427ee4: shl $0x3,%r10
0x0000000108427ee8: cmp %r10,%rax
0x0000000108427eeb: jne 0x00000001082e6ba0 ; {runtime_call}
0x0000000108427ef1: data16 xchg %ax,%ax
0x0000000108427ef4: nopl 0x0(%rax,%rax,1)
0x0000000108427efc: data16 data16 xchg %ax,%ax
[Verified Entry Point]
0x0000000108427f00: mov %eax,-0x14000(%rsp)
0x0000000108427f07: push %rbp
0x0000000108427f08: sub $0x20,%rsp ;*synchronization entry
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@-1 (line 322)
0x0000000108427f0c: mov %rsi,(%rsp)
0x0000000108427f10: mov 0x108(%rsi),%rcx ;*getfield consumerMask
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@11 (line 324)
0x0000000108427f17: mov 0x118(%rsi),%r10d ;*getfield consumerBuffer
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@1 (line 322)
0x0000000108427f1e: mov 0x110(%rsi),%rbp ;*invokevirtual getObjectVolatile
; - org.jctools.util.UnsafeRefArrayAccess::lvElement@5 (line 103)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@27 (line 327)
0x0000000108427f25: mov %rbp,%r8
0x0000000108427f28: and %rcx,%r8 ;*land
; - org.jctools.queues.LinkedArrayQueueUtil::modifiedCalcElementOffset@5 (line 24)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@19 (line 326)
0x0000000108427f2b: mov %r10,%rdx
0x0000000108427f2e: shl $0x3,%rdx ;*getfield consumerBuffer
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@1 (line 322)
0x0000000108427f32: shl %r8 ;*lshl
; - org.jctools.queues.LinkedArrayQueueUtil::modifiedCalcElementOffset@11 (line 24)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@19 (line 326)
0x0000000108427f35: mov 0x10(%rdx,%r8,1),%r10d ;*invokevirtual getObjectVolatile
; - org.jctools.util.UnsafeRefArrayAccess::lvElement@5 (line 103)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@27 (line 327)
0x0000000108427f3a: test %r10d,%r10d
0x0000000108427f3d: je L0002 ;*ifnonnull
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@34 (line 328)
0x0000000108427f3f: lea (%r12,%r10,8),%rax ;*goto
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@59 (line 339)
L0000: movabs $0x76abe17a8,%r10 ; {oop(a 'java/lang/Object')}
0x0000000108427f4d: cmp %r10,%rax
0x0000000108427f50: je L0003
0x0000000108427f52: mov %r12d,0x10(%rdx,%r8,1)
0x0000000108427f57: add $0x2,%rbp
0x0000000108427f5b: mov (%rsp),%r10
0x0000000108427f5f: mov %rbp,0x110(%r10) ;*ifnull
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@56 (line 339)
L0001: add $0x20,%rsp
0x0000000108427f6a: pop %rbp
0x0000000108427f6b: test %eax,-0x343cf71(%rip) # 0x0000000104feb000
; {poll_return} *** SAFEPOINT POLL ***
0x0000000108427f71: retq
L0002: mov 0x88(%rsi),%r10 ;*invokevirtual getLongVolatile
; - org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields::lvProducerIndex@7 (line 61)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@39 (line 330)
0x0000000108427f79: cmp %r10,%rbp
0x0000000108427f7c: jne L0004 ;*ifeq
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@43 (line 330)
0x0000000108427f7e: xor %eax,%eax
0x0000000108427f80: jmp L0001
L0003: mov (%rsp),%rsi
0x0000000108427f86: nop
0x0000000108427f87: callq 0x00000001082e6de0 ; OopMap{[0]=Oop off=172}
;*invokespecial getNextBuffer
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@76 (line 349)
; {optimized virtual_call}
0x0000000108427f8c: mov (%rsp),%rsi
0x0000000108427f90: mov %rax,%rdx
0x0000000108427f93: mov %rbp,%rcx
0x0000000108427f96: nop
0x0000000108427f97: callq 0x00000001082e6de0 ; OopMap{off=188}
;*invokespecial newBufferPoll
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@85 (line 350)
; {optimized virtual_call}
0x0000000108427f9c: jmp L0001
L0004: mov 0x10(%rdx,%r8,1),%r11d ;*invokevirtual getObjectVolatile
; - org.jctools.util.UnsafeRefArrayAccess::lvElement@5 (line 103)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@49 (line 337)
0x0000000108427fa3: test %r11d,%r11d
0x0000000108427fa6: jne L0006 ;*ifnull
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@56 (line 339)
0x0000000108427fa8: mov %r8,%r10
0x0000000108427fab: add $0x10,%r10 ;*ladd
; - org.jctools.queues.LinkedArrayQueueUtil::modifiedCalcElementOffset@12 (line 24)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@19 (line 326)
0x0000000108427faf: nop
L0005: mov 0x10(%rdx,%r8,1),%r11d ; OopMap{r11=NarrowOop rdx=Oop [0]=Oop off=213}
;*ifnull
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@56 (line 339)
0x0000000108427fb5: test %eax,-0x343cfbb(%rip) # 0x0000000104feb000
; {poll} *** SAFEPOINT POLL ***
0x0000000108427fbb: test %r11d,%r11d
0x0000000108427fbe: je L0005 ;*ifnull
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@56 (line 339)
0x0000000108427fc0: lea (%r12,%r11,8),%rax
0x0000000108427fc4: jmpq L0000
L0006: lea (%r12,%r11,8),%rax ;*invokevirtual getObjectVolatile
; - org.jctools.util.UnsafeRefArrayAccess::lvElement@5 (line 103)
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@49 (line 337)
0x0000000108427fcd: jmpq L0000 ;*invokespecial getNextBuffer
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@76 (line 349)
0x0000000108427fd2: mov %rax,%rsi
0x0000000108427fd5: jmp L0007
0x0000000108427fd7: mov %rax,%rsi ;*invokespecial newBufferPoll
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@85 (line 350)
L0007: add $0x20,%rsp
0x0000000108427fde: pop %rbp
0x0000000108427fdf: jmpq 0x00000001083a4a20 ;*goto
; - org.jctools.queues.BaseMpscLinkedArrayQueue::poll@59 (line 339)
; {runtime_call}
0x0000000108427fe4: hlt
0x0000000108427fe5: hlt
0x0000000108427fe6: hlt
0x0000000108427fe7: hlt
0x0000000108427fe8: hlt
0x0000000108427fe9: hlt
0x0000000108427fea: hlt
0x0000000108427feb: hlt
0x0000000108427fec: hlt
0x0000000108427fed: hlt
0x0000000108427fee: hlt
0x0000000108427fef: hlt
0x0000000108427ff0: hlt
0x0000000108427ff1: hlt
0x0000000108427ff2: hlt
0x0000000108427ff3: hlt
0x0000000108427ff4: hlt
0x0000000108427ff5: hlt
0x0000000108427ff6: hlt
0x0000000108427ff7: hlt
0x0000000108427ff8: hlt
0x0000000108427ff9: hlt
0x0000000108427ffa: hlt
0x0000000108427ffb: hlt
0x0000000108427ffc: hlt
0x0000000108427ffd: hlt
0x0000000108427ffe: hlt
0x0000000108427fff: hlt
[Stub Code]
0x0000000108428000: movabs $0x0,%rbx ; {no_reloc}
L0008: jmpq L0008 ; {runtime_call}
0x000000010842800f: movabs $0x0,%rbx ; {static_stub}
L0009: jmpq L0009 ; {runtime_call}
[Exception Handler]
0x000000010842801e: jmpq 0x0000000108310520 ; {runtime_call}
[Deopt Handler Code]
0x0000000108428023: callq 0x0000000108428028
0x0000000108428028: subq $0x5,(%rsp)
0x000000010842802d: jmpq 0x00000001082e8240 ; {runtime_call}
0x0000000108428032: hlt
0x0000000108428033: hlt
0x0000000108428034: hlt
0x0000000108428035: hlt
0x0000000108428036: hlt
0x0000000108428037: hlt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment