SlideShare a Scribd company logo
1 of 77
Download to read offline
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 3
Classroom Training
Learning Subscription
Live Virtual Class
Training On Demand
Keep Learning with Oracle University
education.oracle.com
Cloud
Technology
Applications
Industries
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Session Surveys
Help us help you!!
• Oracle would like to invite you to take a moment to give us your session
feedback. Your feedback will help us to improve your conference.
• Please be sure to add your feedback for your attended sessions by using
the Mobile Survey or in Schedule Builder.
4
Invokedynamic
for Mere Mortals
David Buck
Principal Member of Technical Staff
Java SE
October 26, 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
java.lang.invoke
invokedynamic instruction
Other stuff
1
2
3
4
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Introduction
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Target Audience
• Not compiler writers
• Curious
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Motivation
• Understand javap output better
• Understand the value JVM has as a multi-language JVM
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Da Vinci Machine Project
• The JVM is a great platform for running all sorts of languages
– Great performance
– Portability
– Security (sandbox)
– Pre-existing libraries and frameworks
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• JVM-specific
– Scala
– Clojure
– Groovy
– Ceylon
– Fortress
– Gosu
– Kotlin
• Ported to JVM
– JRuby
– Jython
– Smalltalk
– Ada
– Scheme
– REXX
– Prolog
– Pascal
– Common LISP
(a small subset of) JVM languages
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Code
Language Runtime
13
JVM
OS
Java
Class Library
JRuby Runtime
JVM
OS
Java
Class Library
Ruby Code
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
non-Java language wish list
• Continuations
• Dynamic invocation
• Tail recursion
• Interface injection
• Other stuff
14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
non-Java language wish list
• Continuations
• Dynamic invocation
• Tail recursion
• Interface injection
• Other stuff
15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is dynamic typing?
16
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is dynamic typing?
def addtwo(a, b)
a + b;
end
17
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is dynamic typing?
We do not know what the types are until runtime
18
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
statically-typed vs. dynamically-typed
When do we type check / link?
– Compilation time (javac)
– Runtime
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Compile-time checking / linking
• Catch errors early
• Limits the type of code we can write (false positives)
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Run time checking / linking
• Allow more freedom of programming (less false positives)
• Less guarantees about runtime behavior
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
dynamic typing != type inference
object InferenceTest1 extends App {
val x = 1 + 2 * 3 // the type of x is Int
val y = x.toString() // the type of y is String
def succ(x: Int) = x + 1 // succ returns Int values
}
(Shamelessly copied from http://docs.scala-lang.org/tutorials/tour/local-
type-inference.html)
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
dynamic typing != week typing
a = "40"
b = a + 2
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Dynamically-typed languages
• Allow more programs, but have to do more runtime checking.
• No perfect type information at compile time
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Polymorphism != Dynamic typing (?!)
public String bar(Object o) {
return "You passed me " + o.toString();
}
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The original invocation lineup
• invokestatic
– Class method
• invokevirtual
– Instance method
• invokeinterface
– Interface method
• Invokespecial
• Everything else (private, super class, constructors)
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The original invocation lineup
• invokestatic
– Class method
• invokevirtual
– Instance method
• invokeinterface
– Interface method
• Invokespecial
• Everything else (private, super class, constructors)
27
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
invokestatic
public class InvokeStaticExample {
public static void main(String[] args) {
InvokeStaticExample.foo();
}
public static void foo() {
System.out.println("I am foo!");
}
}
28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The original invocation lineup
• invokestatic
– Class method
• invokevirtual
– Instance method
• invokeinterface
– Interface method
• Invokespecial
• Everything else (private, super class, constructors)
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
invokevirtual
public class InvokeVirtualExample {
public static void main(String[] args) {
InvokeVirtualExample ive = new InvokeVirtualExample();
ive.foo();
}
public void foo() {
System.out.println("I am foo!");
}
}
30
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The original invocation lineup
• invokestatic
– Class method
• invokevirtual
– Instance method
• invokeinterface
– Interface method
• Invokespecial
• Everything else (private, super class, constructors)
31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
public class InvokeInterfaceExample
implements MyInterface {
public static void main(String[] args)
{
MyInterface iie = new
InvokeInterfaceExample();
iie.foo();
}
public void foo() {
System.out.println("I am foo!");
}
}
interface MyInterface {
public void foo();
}
32
invokeinterface
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The original invocation lineup
• invokestatic
– Class method
• invokevirtual
– Instance method
• invokeinterface
– Interface method
• Invokespecial
• Everything else (private, super class, constructors)
33
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
invokespecial
public class InvokeSpecialExample {
public static void main(String[] args) {
InvokeSpecialExample ise = new InvokeSpecialExample();
ise.foo();
}
private void foo() {
System.out.println("I am foo!");
}
}
34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Poor dynamic languages on JVM?
• invocation logic is not baked into the JVM like it is for Java
• we need to fall back on reflection
35
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Reflection is slow
• security check on each invocation
• all arguments are Objects (boxing)
36
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What the JVM doesn’t know can hurt it
37
Caller Reflection Magic! Callee
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Reflection prevents inlining!
38
Caller Reflection Magic! Callee
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
No one writes code like this
if (false) {
// do some important stuff...
System.out.println("I'm important!");
}
39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Or this…
boolean cond = true;
if (cond) {
// do some important stuff...
System.out.println("I'm important!");
}
40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
public void methodB() {
// ...
methodA(false);
// ...
}
public void methodA(boolean
optionalStuff) {
// ...
if (optionalStuff) {
// do some optional, but
important stuff...
System.out.println("I'm important
sometimes!");
}
// ...
}
41
But we do write stuff like
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JSR-292
• java.lang.invoke API
A “better reflection”
• invokedynamic bytecode
Allows us to dispatch to linkage logic defined by invoke API
42
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
invokedynamic
• We call it “indy”
• No clear way to express in Java language
• Important milestone for JVM
– First new instruction in decades
– First new JVM feature to only (mainly) target non-java languages
43
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
java.lang.invoke API
• MethodHandle
• CallSite
• Bootstrap Method (BSM)
44
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle
45
int foo()Method Handle
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle
• Points to a method
• Is a “function pointer” (am I allowed to say this?)
• Polymorphic signature
46
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle Performance
47
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle Performance
• Early performance was not ideal
48
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle Performance
• Early performance was not ideal
• Performance improved tremendously with lambda forms
49
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle Performance
• Early performance was not ideal
• Performance improved tremendously with lambda forms
• Is now often significantly faster than reflection
50
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MethodHandle Performance
• Early performance was not ideal
• Performance improved tremendously with lambda forms
• Is now often significantly faster than reflection
• Can be used independently of invokedynamic
51
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CallSite
52
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return
CS Method Handle int foo()
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CallSite
53
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return
CS
int bar()
int foo()
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CallSite
• Reifies Indy invocation side
• Has a MethodHandle
54
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrapping Step 1
55
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrapping Step 2
56
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return BootStrap Method
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrapping Step 3
57
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return BootStrap Method
int foo()
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrapping Step 4
58
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return BootStrap Method
int foo()
CS
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrapping Step 5
59
private void doStuff();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
0: new #7
3: dup
4: invokespecial #8
7: astore_1
8: aload_1
9: aload_0
10: invokedynamic #9, 0
15: invokevirtual #10
18: return
int foo()
CS
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bootstrap Method
• Only called on the first invocation of each indy bytecode
• Returns a CallSite
60
"Dr Martens, black, old" by Tarquin
is licensed under CC BY-SA 3.0
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Indy lifecycle
Initial Invocation
1. A specific indy invocation is executed for the first time
2. Bootstrap method is called and if finds (generates?!) a method to run
3. Botstrap method returns a permanent CallSite object for this indy
invocation
4. We jump to the method pointed to by the CallSite
61
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Indy Lifecycle
All subsequent calls
We jump to the method pointed to by the CallSite
62
Picture from
National Archives and Records Administration
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
This performance tragedy becomes
63
Caller Reflection Magic! Callee
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 64
Caller Callee
MethodHandle
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Linkage != Invocation
65
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Linkage != Invocation
• Linkage (i.e. bootstrap)
– Usually only needs to be done once
– Is expensive
66
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Linkage != Invocation
• Linkage (i.e. bootstrap)
– Usually only needs to be done once
– Is expensive
• Invocation
– Done a lot
– Only needs a jmp/call (and possibly a guard)
67
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Linkage != Dispatch
• Avoid the cost of linkage on almost every call
68
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Takeaways
69
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Takeaways
• Invokedynamic lets us programmatically alter linkage
70
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Takeaways
• Invokedynamic lets us programmatically alter linkage
• Then it gets out of the way! (linkage != invocation)
71
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Takeaways
• Invokedynamic lets us programmatically alter linkage
• Then it gets out of the way! (linkage != invocation)
• The Invoke API can often be used without indy
72
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Takeaways
• Invokedynamic lets us programmatically alter linkage
• Then it gets out of the way! (linkage != invocation)
• The Invoke API can often be used without indy
• JVM is a great platform for just about any language!
73
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Resources
• JVM Language Summit
http://openjdk.java.net/projects/mlvm/jvmlangsummit/
• Linkers & Loaders book
http://linker.iecc.com/
• John Rose’s Blog
https://blogs.oracle.com/jrose/
74
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thank You!
75
Oracle University Invokedynamic Training Document
Oracle University Invokedynamic Training Document

More Related Content

What's hot

Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSteve Fort
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureJavaDayUA
 
PROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IIPROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IISivaSankari36
 
JShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJavaDayUA
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java Hitesh-Java
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Steven Smith
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programmingagorolabs
 
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)SmartnSkilled
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java BasicsVicter Paul
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling SoftwareAbdelmonaim Remani
 
Machine Learning Exposed!
Machine Learning Exposed!Machine Learning Exposed!
Machine Learning Exposed!javafxpert
 

What's hot (20)

Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
PROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IIPROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part II
 
JShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java Platform
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
Exception handling
Exception handlingException handling
Exception handling
 
Scala presentationjune112011
Scala presentationjune112011Scala presentationjune112011
Scala presentationjune112011
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
 
Hotspot & AOT
Hotspot & AOTHotspot & AOT
Hotspot & AOT
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
 
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java Basics
 
Java Basics
Java BasicsJava Basics
Java Basics
 
PROGRAMMING IN JAVA
PROGRAMMING IN JAVAPROGRAMMING IN JAVA
PROGRAMMING IN JAVA
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...
JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...
JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...
 
Machine Learning Exposed!
Machine Learning Exposed!Machine Learning Exposed!
Machine Learning Exposed!
 
Java Reflection @KonaTechAdda
Java Reflection @KonaTechAddaJava Reflection @KonaTechAdda
Java Reflection @KonaTechAdda
 

Similar to Oracle University Invokedynamic Training Document

HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]David Buck
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachPROIDEA
 
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]David Buck
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Codemotion Tel Aviv
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterJAXLondon2014
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Simon Ritter
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevillaTrisha Gee
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediZeroTurnaround
 
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...LDBC council
 
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...JAXLondon2014
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeJAXLondon2014
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...jaxLondonConference
 
Pushing Java EE outside of the Enterprise - Home Automation
Pushing Java EE outside of the Enterprise - Home AutomationPushing Java EE outside of the Enterprise - Home Automation
Pushing Java EE outside of the Enterprise - Home AutomationDavid Delabassee
 
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...[meetup] Mastering Java enhancements like a Pro: practical design patterns an...
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...Miro Wengner
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETGeertjan Wielenga
 
Oracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suiteOracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suiteOTN Systems Hub
 

Similar to Oracle University Invokedynamic Training Document (20)

HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
 
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila Szegedi
 
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...
8th TUC Meeting - David Meibusch, Nathan Hawes (Oracle Labs Australia). Frapp...
 
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
Completable future
Completable futureCompletable future
Completable future
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 
Serverless Kotlin
Serverless KotlinServerless Kotlin
Serverless Kotlin
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
 
Pushing Java EE outside of the Enterprise - Home Automation
Pushing Java EE outside of the Enterprise - Home AutomationPushing Java EE outside of the Enterprise - Home Automation
Pushing Java EE outside of the Enterprise - Home Automation
 
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...[meetup] Mastering Java enhancements like a Pro: practical design patterns an...
[meetup] Mastering Java enhancements like a Pro: practical design patterns an...
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
 
Oracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suiteOracle super cluster for oracle e business suite
Oracle super cluster for oracle e business suite
 

More from David Buck

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]David Buck
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...David Buck
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]David Buck
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...David Buck
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]David Buck
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...David Buck
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]David Buck
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage CollectorDavid Buck
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019David Buck
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018David Buck
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそDavid Buck
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]David Buck
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]David Buck
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]David Buck
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] David Buck
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...David Buck
 

More from David Buck (20)

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage Collector
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそ
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
 

Recently uploaded

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

Oracle University Invokedynamic Training Document

  • 1.
  • 2.
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 3 Classroom Training Learning Subscription Live Virtual Class Training On Demand Keep Learning with Oracle University education.oracle.com Cloud Technology Applications Industries
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Session Surveys Help us help you!! • Oracle would like to invite you to take a moment to give us your session feedback. Your feedback will help us to improve your conference. • Please be sure to add your feedback for your attended sessions by using the Mobile Survey or in Schedule Builder. 4
  • 5. Invokedynamic for Mere Mortals David Buck Principal Member of Technical Staff Java SE October 26, 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction java.lang.invoke invokedynamic instruction Other stuff 1 2 3 4 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Introduction 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Target Audience • Not compiler writers • Curious 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Motivation • Understand javap output better • Understand the value JVM has as a multi-language JVM 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Da Vinci Machine Project • The JVM is a great platform for running all sorts of languages – Great performance – Portability – Security (sandbox) – Pre-existing libraries and frameworks 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • JVM-specific – Scala – Clojure – Groovy – Ceylon – Fortress – Gosu – Kotlin • Ported to JVM – JRuby – Jython – Smalltalk – Ada – Scheme – REXX – Prolog – Pascal – Common LISP (a small subset of) JVM languages 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Code Language Runtime 13 JVM OS Java Class Library JRuby Runtime JVM OS Java Class Library Ruby Code
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | non-Java language wish list • Continuations • Dynamic invocation • Tail recursion • Interface injection • Other stuff 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | non-Java language wish list • Continuations • Dynamic invocation • Tail recursion • Interface injection • Other stuff 15
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is dynamic typing? 16
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is dynamic typing? def addtwo(a, b) a + b; end 17
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is dynamic typing? We do not know what the types are until runtime 18
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | statically-typed vs. dynamically-typed When do we type check / link? – Compilation time (javac) – Runtime 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Compile-time checking / linking • Catch errors early • Limits the type of code we can write (false positives) 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Run time checking / linking • Allow more freedom of programming (less false positives) • Less guarantees about runtime behavior 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | dynamic typing != type inference object InferenceTest1 extends App { val x = 1 + 2 * 3 // the type of x is Int val y = x.toString() // the type of y is String def succ(x: Int) = x + 1 // succ returns Int values } (Shamelessly copied from http://docs.scala-lang.org/tutorials/tour/local- type-inference.html) 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | dynamic typing != week typing a = "40" b = a + 2 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Dynamically-typed languages • Allow more programs, but have to do more runtime checking. • No perfect type information at compile time 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Polymorphism != Dynamic typing (?!) public String bar(Object o) { return "You passed me " + o.toString(); } 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The original invocation lineup • invokestatic – Class method • invokevirtual – Instance method • invokeinterface – Interface method • Invokespecial • Everything else (private, super class, constructors) 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The original invocation lineup • invokestatic – Class method • invokevirtual – Instance method • invokeinterface – Interface method • Invokespecial • Everything else (private, super class, constructors) 27
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | invokestatic public class InvokeStaticExample { public static void main(String[] args) { InvokeStaticExample.foo(); } public static void foo() { System.out.println("I am foo!"); } } 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The original invocation lineup • invokestatic – Class method • invokevirtual – Instance method • invokeinterface – Interface method • Invokespecial • Everything else (private, super class, constructors) 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | invokevirtual public class InvokeVirtualExample { public static void main(String[] args) { InvokeVirtualExample ive = new InvokeVirtualExample(); ive.foo(); } public void foo() { System.out.println("I am foo!"); } } 30
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The original invocation lineup • invokestatic – Class method • invokevirtual – Instance method • invokeinterface – Interface method • Invokespecial • Everything else (private, super class, constructors) 31
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | public class InvokeInterfaceExample implements MyInterface { public static void main(String[] args) { MyInterface iie = new InvokeInterfaceExample(); iie.foo(); } public void foo() { System.out.println("I am foo!"); } } interface MyInterface { public void foo(); } 32 invokeinterface
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The original invocation lineup • invokestatic – Class method • invokevirtual – Instance method • invokeinterface – Interface method • Invokespecial • Everything else (private, super class, constructors) 33
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | invokespecial public class InvokeSpecialExample { public static void main(String[] args) { InvokeSpecialExample ise = new InvokeSpecialExample(); ise.foo(); } private void foo() { System.out.println("I am foo!"); } } 34
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Poor dynamic languages on JVM? • invocation logic is not baked into the JVM like it is for Java • we need to fall back on reflection 35
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Reflection is slow • security check on each invocation • all arguments are Objects (boxing) 36
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What the JVM doesn’t know can hurt it 37 Caller Reflection Magic! Callee
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Reflection prevents inlining! 38 Caller Reflection Magic! Callee
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | No one writes code like this if (false) { // do some important stuff... System.out.println("I'm important!"); } 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Or this… boolean cond = true; if (cond) { // do some important stuff... System.out.println("I'm important!"); } 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | public void methodB() { // ... methodA(false); // ... } public void methodA(boolean optionalStuff) { // ... if (optionalStuff) { // do some optional, but important stuff... System.out.println("I'm important sometimes!"); } // ... } 41 But we do write stuff like
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | JSR-292 • java.lang.invoke API A “better reflection” • invokedynamic bytecode Allows us to dispatch to linkage logic defined by invoke API 42
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | invokedynamic • We call it “indy” • No clear way to express in Java language • Important milestone for JVM – First new instruction in decades – First new JVM feature to only (mainly) target non-java languages 43
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | java.lang.invoke API • MethodHandle • CallSite • Bootstrap Method (BSM) 44
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle 45 int foo()Method Handle
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle • Points to a method • Is a “function pointer” (am I allowed to say this?) • Polymorphic signature 46
  • 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle Performance 47
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle Performance • Early performance was not ideal 48
  • 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle Performance • Early performance was not ideal • Performance improved tremendously with lambda forms 49
  • 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle Performance • Early performance was not ideal • Performance improved tremendously with lambda forms • Is now often significantly faster than reflection 50
  • 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MethodHandle Performance • Early performance was not ideal • Performance improved tremendously with lambda forms • Is now often significantly faster than reflection • Can be used independently of invokedynamic 51
  • 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CallSite 52 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return CS Method Handle int foo()
  • 53. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CallSite 53 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return CS int bar() int foo()
  • 54. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CallSite • Reifies Indy invocation side • Has a MethodHandle 54
  • 55. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrapping Step 1 55 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return
  • 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrapping Step 2 56 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return BootStrap Method
  • 57. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrapping Step 3 57 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return BootStrap Method int foo()
  • 58. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrapping Step 4 58 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return BootStrap Method int foo() CS
  • 59. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrapping Step 5 59 private void doStuff(); descriptor: ()V flags: ACC_PRIVATE Code: stack=2, locals=2, args_size=1 0: new #7 3: dup 4: invokespecial #8 7: astore_1 8: aload_1 9: aload_0 10: invokedynamic #9, 0 15: invokevirtual #10 18: return int foo() CS
  • 60. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bootstrap Method • Only called on the first invocation of each indy bytecode • Returns a CallSite 60 "Dr Martens, black, old" by Tarquin is licensed under CC BY-SA 3.0
  • 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Indy lifecycle Initial Invocation 1. A specific indy invocation is executed for the first time 2. Bootstrap method is called and if finds (generates?!) a method to run 3. Botstrap method returns a permanent CallSite object for this indy invocation 4. We jump to the method pointed to by the CallSite 61
  • 62. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Indy Lifecycle All subsequent calls We jump to the method pointed to by the CallSite 62 Picture from National Archives and Records Administration
  • 63. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | This performance tragedy becomes 63 Caller Reflection Magic! Callee
  • 64. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 64 Caller Callee MethodHandle
  • 65. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Linkage != Invocation 65
  • 66. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Linkage != Invocation • Linkage (i.e. bootstrap) – Usually only needs to be done once – Is expensive 66
  • 67. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Linkage != Invocation • Linkage (i.e. bootstrap) – Usually only needs to be done once – Is expensive • Invocation – Done a lot – Only needs a jmp/call (and possibly a guard) 67
  • 68. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Linkage != Dispatch • Avoid the cost of linkage on almost every call 68
  • 69. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Takeaways 69
  • 70. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Takeaways • Invokedynamic lets us programmatically alter linkage 70
  • 71. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Takeaways • Invokedynamic lets us programmatically alter linkage • Then it gets out of the way! (linkage != invocation) 71
  • 72. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Takeaways • Invokedynamic lets us programmatically alter linkage • Then it gets out of the way! (linkage != invocation) • The Invoke API can often be used without indy 72
  • 73. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Takeaways • Invokedynamic lets us programmatically alter linkage • Then it gets out of the way! (linkage != invocation) • The Invoke API can often be used without indy • JVM is a great platform for just about any language! 73
  • 74. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Resources • JVM Language Summit http://openjdk.java.net/projects/mlvm/jvmlangsummit/ • Linkers & Loaders book http://linker.iecc.com/ • John Rose’s Blog https://blogs.oracle.com/jrose/ 74
  • 75. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thank You! 75