The document discusses Java compilation and the Java Virtual Machine. It explains that Java code is first compiled to bytecode, then just-in-time compiled by the JVM to native machine code using multiple compilers. The JVM uses a technique called tiered compilation that starts with simple compilation and progresses to more optimized compilation. Tiered compilation aims to provide both fast startup and high performance.
12. Just-in-time compilation
An attempt to mix pros of both static
compilation and interpretation
In most cases, operates on some sort
of an intermediate level code
28. C1 & C2 background
Long ago JDK was published in two
versions: client and server.
29. C1 & C2 background
Long ago JDK was published in two
versions: client and server.
C1 was dedicated for the optimization
of application startup time.
30. C1 & C2 background
Long ago JDK was published in two
versions: client and server.
C1 was dedicated for the optimization
of application startup time.
C2 was dedicated for a long-running
application with strict performance
limits.
36. C2
Focused at providing profile based
optimizations.
C2 compiled code will be much
faster than C1.
37. C2
Focused at providing profile based
optimizations.
C2 compiled code will be much
faster than C1.
At this point no more major
enhancements for C2 compiler are
possible.
59. When the code will be compiled
When piece of code will reach a certain call
threshold.
60. When the code will be compiled
When piece of code will reach a certain call
threshold.
When loop Back Branching counter will reach
certain threshold.
61. When the code will be compiled
When piece of code will reach a certain call
threshold.
When loop Back Branching counter will reach
certain threshold.
Method execution time is also a factor.
83. Graal Compiler
Written in Java.
New communication interface - JVMCI
Uses tiered compilation concept.
84. Graal Compiler
Written in Java.
New communication interface - JVMCI
Uses tiered compilation concept.
Includes 62 different optimizations.
85. Graal Compiler
Written in Java.
New communication interface - JVMCI
Uses tiered compilation concept.
Includes 62 different optimizations.
Better at optimizing "new" code.
86. Graal Compiler
Written in Java.
New communication interface - JVMCI
Uses tiered compilation concept.
Includes 62 different optimizations.
Better at optimizing "new" code.
Better profile-guided optimization.
90. We have three types of compilation.
Java has three compilers.
Recap
91. We have three types of compilation.
Java has three compilers.
JVM uses Tiered Compilation.
Recap
92. We have three types of compilation.
Java has three compilers.
JVM uses Tiered Compilation.
HotSpot comes from the way how JVM
compiles code.
Recap
93. We have three types of compilation.
Java has three compilers.
JVM uses Tiered Compilation.
HotSpot comes from the way how JVM
compiles code.
Graal brought us a new version of C2
compiler.
Recap