Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InvokeDynamic: Your API for HotSpot

tarcieri
October 11, 2012

InvokeDynamic: Your API for HotSpot

tarcieri

October 11, 2012
Tweet

More Decks by tarcieri

Other Decks in Programming

Transcript

  1. JIT

  2. Generate machine code Compile JVM bytecode to native ISA BYTECODE

    1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 after 10,000 calls
  3. •Measure invocations and branches •Make an educated guess •Inline the

    code in question •Back out if we guessed wrong Inlining
  4. •Check invariants at a “safe point” •Did we guess wrong?

    •Revert optimization and try again Deopt
  5. InDy •JSR-292: “Supporting Dynamically Typed Languages on the Java Platform”

    •Initial version shipped in Java 7 •Feeds directly into HotSpot in Java 8
  6. InDy Use Cases •Custom invocation •“Constant” values (e.g. globals, language

    intrinsics) •Scoped values (e.g. instance variables)
  7. Bootstrap Method •Called the first time each InDy call site

    is used •Find MethodHandle to dispatch •Return CallSite object
  8. java.lang.invoke.SwitchPoint •Publish events across threads (e.g. blow caches when classes

    change) •Only event is valid -> invalid •Hooks directly into the HotSpot deoptimizer (no additional branches)
  9. CallSite: where the call is taking place SwitchPoint: did the

    class change? GuardWithTest: is this the type we bound? Invocation example
  10. CallSite: where the call is taking place SwitchPoint: did the

    class change? GuardWithTest: is this the type we bound? Target: invoke the target method Invocation example
  11. CallSite: where the call is taking place SwitchPoint: did the

    class change? GuardWithTest: is this the type we bound? Target: invoke the target method Rebind: lookup new method and rebuild call site - or - Invocation example
  12. CallSite: where the call is taking place SwitchPoint: did the

    class change? GuardWithTest: is this the type we bound? Target: invoke the target method Rebind: lookup new method and rebuild call site - or - - or - Rebind: lookup potentially changed methods Invocation example
  13. def foo; 1; end def invoker; foo; end i =

    0 while i < 10000 invoker i+=1 end Contrived Ruby code
  14. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq
  15. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Stack juggling
  16. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Is “self” a Ruby object?
  17. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Same metaclass as before?
  18. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Store Fixnum “1” for return
  19. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Note: inside the “foo” method
  20. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Stack juggling
  21. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Safe point check
  22. 0x00000001060a1be0: mov %eax,-0x14000(%rsp) 0x00000001060a1be7: push %rbp 0x00000001060a1be8: sub $0x30,%rsp ;*synchronization

    entry ; - ruby.__dash_e__::method__1$RUBY$invoker@-1 (line 1) 0x00000001060a1bec: mov 0x8(%rcx),%r10d ; implicit exception: dispatches to 0x00000001060a1c55 0x00000001060a1bf0: cmp $0xfb7aedc9,%r10d ; {oop('org/jruby/RubyObject')} 0x00000001060a1bf7: jne 0x00000001060a1c39 0x00000001060a1bf9: mov %rcx,%r10 ;*checkcast ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@2 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1bfc: mov 0x10(%r10),%ebp ;*getfield metaClass ; - org.jruby.RubyBasicObject::getMetaClass@1 (line 520) ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@5 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c00: cmp $0xfed77602,%ebp ; {oop(a 'org/jruby/MetaClass')} 0x00000001060a1c06: jne 0x00000001060a1c1e ;*if_acmpne ; - org.jruby.runtime.invokedynamic.InvocationLinker::testMetaclass@8 (line 633) ; - java.lang.invoke.MethodHandle::invokeExact@3 ; - java.lang.invoke.MethodHandle::invokeExact@5 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) 0x00000001060a1c08: movabs $0x7f6bf4bb0,%rax ;*areturn ; - ruby.__dash_e__::method__0$RUBY$foo@6 (line 1) ; - java.lang.invoke.MethodHandle::invokeExact@6 ; - java.lang.invoke.MethodHandle::invokeExact@31 ; - java.lang.invoke.MethodHandle::invokeExact@29 ; - ruby.__dash_e__::method__1$RUBY$invoker@3 (line 1) ; {oop(a 'org/jruby/RubyFixnum')} 0x00000001060a1c12: add $0x30,%rsp 0x00000001060a1c16: pop %rbp 0x00000001060a1c17: test %eax,-0xec3c1d(%rip) # 0x00000001051de000 ; {poll_return} 0x00000001060a1c1d: retq Done!