More Related Content Similar to Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738] (20) More from David Buck (20) Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Full Speed Ahead! (Ahead-of-Time
Compilation for Java SE)
CON3738
David Buck
Principal Member of Technical Staff
Java Platform Group
October 4th, 2017
Confidential – Oracle Internal/Restricted/Highly Restricted 3
4. Copyright © 2017, 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.
Confidential – Oracle Internal/Restricted/Highly Restricted 4
5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• JVM Sustaining Engineer
• OpenJDK 8 Update Project
Maintainer
• JavaOne Rock Star
• Co-author of Oracle WebLogic
Server 11g 構築・運用ガイド
• @DavidBuckJP
• https://blogs.oracle.com/buck/
Hi There!
6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Warnings
AoT Basics
Similar Functionality
Usage
1
2
3
4
9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Warnings
• AoT is still experimental and not yet officially supported
10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Warnings
• AoT is still experimental and not yet officially supported
• Currently only Linux on AMD64 (w/ libelf.so) is supported
11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Warnings
• AoT is still experimental and not yet officially supported
• Currently only Linux on AMD64 (w/ libelf.so) is supported
• No official documentation (only the JEP)
12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Warnings
• AoT is still experimental and not yet officially supported
• Currently only Linux on AMD64 (w/ libelf.so) is supported
• No official documentation (only the JEP)
• There is no official roadmap for support yet
13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
AoT Basics
14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why learn about Java AoT?
15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why learn about Java AoT?
• May be supported in the future
16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why learn about Java AoT?
• May be supported in the future
• Excuse to study other HotSpot technologies
17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why learn about Java AoT?
• May be supported in the future
• Excuse to study other HotSpot technologies
• Fun
18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model (Interpreter)
MyClass.java MyClass.class java
(HotSpot)
javac
19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model (JIT)
MyClass.java MyClass.class java
(HotSpot)
javac
Machine
Language
(in memory)
20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
• Methods get compiled
22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
• Methods get compiled
• Compilation is expensive (both in cpu time and memory)
23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
• Methods get compiled
• Compilation is expensive (both in cpu time and memory)
• ML version is fast
24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
• Methods get compiled
• Compilation is expensive (both in cpu time and memory)
• ML version is fast
• Is JIT really faster than an interpreter?
25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
Better performance than an interpreter?
28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
Better performance than an interpreter?
Depends on your definition of “performance”
29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ time ./hello_j1
Hello JavaOne!
real 0m0.002s
user 0m0.001s
$ time java HelloJ1
Hello JavaOne!
real 0m0.104s
user 0m0.077s
sys 0m0.020s
Just in Time Compilation (JIT)
30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
Weak Point
• Compilation overhead is high
– Delay before native code can be executed
– Heavy resource (memory / CPU cycles) consumption
• Interpretation is better for non-hot methods
31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT)
(HotSpot’s Implimentation)
• All methods start off being interpreted
• Hot methods identified by sample-based profiling
• Hot methods are compiled
• Non-hot methods continue to be interpreted
32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Even with HotSpot’s JIT
• Application startup time is longer
• It takes longer to achieve peak performance
• Compilation consumes a lot of memory
• There are platforms where runtime code generation is not allowed
Compared to native (C/C++) compilation
33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Just in Time Compilation (JIT) HotSpot’s Implementation
A tale of two compilers…
• C2
– For server use
– Heavy optimization
– Dependent on profiling data collected by the interpreter
– Default CompileThreshold: 10000
• C1
– For client use
– Less optimization
– Not dependent on profiling data
– Default CompileThreshold : 1500
34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Ahead of Time (AoT) Strategy
• Generate machine code before runtime
• Load preexisting machine code during runtime
• No need to JIT compile code at runtime
35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model (AoT)
MyClass.java MyClass.class java
(HotSpot)
javac
Machine
Language
(in memory)
36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model (AoT)
MyClass.java MyClass.class java
(HotSpot)
javac
my_class.so
jaotc
37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model
java
(HotSpot)
Machine
Language
(in memory)
java
(HotSpot)
Machine
Language
(in memory)
java
(HotSpot)
Machine
Language
(in memory)
java
(HotSpot)
Machine
Language
(in memory)
38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Java Build / Execution Model
java
(HotSpot)
java
(HotSpot)
java
(HotSpot)
java
(HotSpot)
my_class.so
39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
• Less time to peak performance / steady state ★
42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
• Less time to peak performance / steady state ★
• Less runtime compilation overhead (CPU / memory) ★
43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
• Less time to peak performance / steady state ★
• Less runtime compilation overhead (CPU / memory) ★
• Native code can be shared across multiple processes ★
44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
• Less time to peak performance / steady state ★
• Less runtime compilation overhead (CPU / memory) ★
• Native code can be shared across multiple processes ★
• Native code performance even on platforms that disallow JIT ★
45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Advantages of Ahead of Time (AoT)
• Faster startup times ★
• Less time to peak performance / steady state ★
• Less runtime compilation overhead (CPU / memory) ★
• Native code can be shared across multiple processes ★
• Native code performance even on platforms that disallow JIT ★
★ YMMV
47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Similar Functionality
48. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Similar Functionality
• Tiered Compilation
• Class Data Sharing(CDS) / AppCDS
49. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Tiered Compilation
• Server JVM without Tiered Compilation
– Interpreter (w/ profiling)
– C2
• Server JVM with Tiered Compilation
– Interpreter (w/ profiling)
– C1 (w/ profiling)
– C2
50. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
No Class Data Sharing
java
(HotSpot)
Class Data
(in memory)java
(HotSpot)
Class Data
(in memory)
java
(HotSpot)
Class Data
(in memory)
java
(HotSpot)
Class Data
(in memory)
51. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Class Data Sharing
java
(HotSpot)
java
(HotSpot)
java
(HotSpot)
java
(HotSpot)
Class Data
classes.jsa
52. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• Class Data Sharing
– Only Java SE Class Library
• AppCDS
– Includes application classes as well
53. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Same as AoT
• Tiered Compilation
– Quicker warm up
• Class Data Sharing(CDS) / AppCDS
– Quicker warm up
– Lower total memory footprint
Different from AoT
• No machine (native) code is
persisted or shared
Similar Functionality
54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Corporate Photography Collection
56. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
A New Tool: jaotc
MyClass.class my_class.sojaotc
57. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --output libHelloAOT.so HelloAoT.class
jaotc
58. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --help
Usage: jaotc <options> list
list A : separated list of class names, modules, jar files
or directories which contain class files.
where options include:
--output <file> Output file name
--class-name <class names> List of classes to compile
--jar <jarfiles> List of jar files to compile
--module <modules> List of modules to compile
--directory <dirs> List of directories where to search for files to compile
--search-path <dirs> List of directories where to search for specified files
--compile-commands <file> Name of file with compile commands
--compile-for-tiered Generate profiling code for tiered compilation
--compile-with-assertions Compile with java assertions
--compile-threads <number> Number of compilation threads to be used
--ignore-errors Ignores all exceptions thrown during class loading
--exit-on-error Exit on compilation errors
--info Print information during compilation
--verbose Print verbose information
--debug Print debug information
--help Print this usage message
--version Version information
-J<flag> Pass <flag> directly to the runtime system
jaotc (On-line Help)
59. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --info --output libHelloAOT.so HelloAoT.class
Compiling libHelloAOT...
1 classes found (30 ms)
2 methods total, 2 methods to compile (4 ms)
Compiling with 8 threads
.
2 methods compiled, 0 methods failed (409 ms)
Parsing compiled code (1 ms)
Processing metadata (15 ms)
Preparing stubs binary (1 ms)
Preparing compiled binary (1 ms)
Creating binary: libHelloAOT.o (8 ms)
Creating shared library: libHelloAOT.so (13 ms)
Total time: 912 ms
jaotc (--info Flag)
60. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --info --compile-with-assertions --output libHelloAOT.so HelloAoT.class
jaotc (--compile-with-assertions Flag)
61. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --compile-commands cc.txt --output libHelloAOT.so HelloAoT.class
$ cat cc.txt
exclude org.sample.code.MyClass.method*
exclude org.sample.code.MyClass.<init>
jaotc (--compile-commands Flag)
62. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --output libjava.base.so --module java.base
jaotc (Modules)
63. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc --output libjava.base.so --jar my-spiffy-app.jar
jaotc (Jar Files)
64. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc -J-XX:-UseCompressedOop --output libHelloAOT.so HelloAoT.class
VM Options are important here! (more to come…)
jaotc (VM Options)
65. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
jaotc (--compile-for-tiered Flag)
• jaotc uses Graal to compile
• Performance is similar to C1
• --compile-for-tiered generates code that includes profiling instrumentation
needed by C2
Confidential – Oracle Internal/Restricted/Highly Restricted 65
66. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ java -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Runtime
67. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ java -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Hello AoT!
$
Runtime
68. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ java -XX:+PrintAOT -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Runtime (-XX:+/-PrintAOT)
69. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ builds/jdk-9/bin/java -XX:+PrintAOT -XX:AOTLibrary=./libHelloAoT.so HelloAoT
13 1 loaded ./libHelloAoT.so aot library
76 1 aot[ 1] HelloAoT.<init>()V
76 2 aot[ 1] HelloAoT.main([Ljava/lang/String;)V
Hello AoT!
$
Runtime (-XX:+/-PrintAOT)
70. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ java -XX:-UseCompressedOops -XX:+PrintAOT -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Runtime (Compressed Oops Disabled)
71. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ java -XX:-UseCompressedOops -XX:+PrintAOT -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Shared file ./libHelloAoT.so error: UseCompressedOops has different value 'true' from
current 'false'
7 1 skipped ./libHelloAoT.so aot library
Hello AoT!
$
Runtime (Compressed Oops Disabled)
72. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ builds/jdk-9/bin/java -XX:-UseCompressedOops -XX:AOTLibrary=./libHelloAoT.so HelloAoT
Hello AoT!
$
Runtime (Compressed Oops Disabled)
73. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
$ jaotc -J-XX:-UseCompressedOop --output libHelloAOT.so HelloAoT.class
jaotc (Be sure to synchronize VM options)
Compressed OOPs Normal OOPs
G1 -J-XX:+UseCompressedOops
-J-XX:+UseG1GC
-J-XX:-UseCompressedOops
-J-XX:+UseG1GC
ParallelGC -J-XX:+UseCompressedOops
-J-XX:+UseParallelGC
-J-XX:-UseCompressedOops
-J-XX:+UseParallelGC
74. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is < 4GB, 32 MSB of every heap address is the same!
• We can store just the 32 LSB of each address
• Each reference field is half the size
Confidential – Oracle Internal/Restricted/Highly Restricted 74
Compressed Oops
64-bit Address
75. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is < 4GB, 32 MSB of every heap address is the same!
• We can store just the 32 LSB of each address
• Each reference field is half the size
Confidential – Oracle Internal/Restricted/Highly Restricted 75
Compressed Oops
32 MSB 32 LSB
76. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is < 4GB, 32 MSB of every heap address is the same!
• We can store just the 32 LSB of each address
• Each reference field is half the size
Confidential – Oracle Internal/Restricted/Highly Restricted 76
Compressed Oops
Always the same! 32 LSB
77. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is < 4GB, 32 MSB of every heap address is the same!
• We can store just the 32 LSB of each address
• Each reference field is half the size
Confidential – Oracle Internal/Restricted/Highly Restricted 77
Compressed Oops
32 LSB
78. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is < 4GB, 32 MSB of every heap address is the same!
• We can store just the 32 LSB of each address
• Each reference field is half the size
• uncompressed_oop = heap_base + compressed_oop
Confidential – Oracle Internal/Restricted/Highly Restricted 78
Compressed Oops
32 LSB
79. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is > than 4GB but < 32GB we can still compress the Oop
• 64-bit platform has an 8-byte alignment requirement
• 3 LSB of every heap address are always zero
• So we can shift the address 3 bits right/left to compress/uncompress
Confidential – Oracle Internal/Restricted/Highly Restricted 79
Compressed Oops
64-bit Address
80. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is > than 4GB but < 32GB we can still compress the Oop
• 64-bit platform has an 8-byte alignment requirement
• 3 LSB of every heap address are always zero
• So we can shift the address 3 bits right/left to compress/uncompress
Confidential – Oracle Internal/Restricted/Highly Restricted 80
Compressed Oops
64-bit Address 000
81. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is > than 4GB but < 32GB we can still compress the Oop
• 64-bit platform has an 8-byte alignment requirement
• 3 LSB of every heap address are always zero
• So we can shift the address 3 bits right/left to compress/uncompress
Confidential – Oracle Internal/Restricted/Highly Restricted 81
Compressed Oops
32-bit 000
82. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is > than 4GB but < 32GB we can still compress the Oop
• 64-bit platform has an 8-byte alignment requirement
• 3 LSB of every heap address are always zero
• So we can shift the address 3 bits right/left to compress/uncompress
Confidential – Oracle Internal/Restricted/Highly Restricted 82
Compressed Oops
32-bit
83. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• If heap is > than 4GB but < 32GB we can still compress the Oop
• 64-bit platform has an 8-byte alignment requirement
• 3 LSB of every heap address are always zero
• So we can shift the address 3 bits right/left to compress/uncompress
• uncompressed_oop = heap_base + (compressed_oop << 3)
Confidential – Oracle Internal/Restricted/Highly Restricted 83
Compressed Oops
32-bit
84. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 84
Write Barriers
85. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 85
Write Barriers
Young Not Young
86. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 86
Write Barriers
Young Not Young! New
87. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 87
Write Barriers
Young Not Young! New !
88. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 88
Write Barriers
Young Not Young
Card Table
89. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 89
Write Barriers
Young Not Young! New
Card Table
90. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why do we need to synchronize VM Options?
• To avoid marking the entire heap, we need to keep track of changes
Confidential – Oracle Internal/Restricted/Highly Restricted 90
Write Barriers
Young Not Young! New !
Card Table
91. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Known Library Locations ($JAVA_HOME/lib/)
• -XX:-UseCompressedOops -XX:+UseG1GC : libjava.base.so
• -XX:+UseCompressedOops -XX:+UseG1GC : libjava.base-coop.so
• -XX:-UseCompressedOops -XX:+UseParallelGC : libjava.base-nong1.so
• -XX:+UseCompressedOops -XX:+UseParallelGC : libjava.base-coop-nong1.so
Confidential – Oracle Internal/Restricted/Highly Restricted 91
VMOptions must match library name
92. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Known Library Locations ($JAVA_HOME/lib/)
• jdk.compiler
• jdk.scripting.nashorn
• jdk.vm.ci
• jdk.vm.compiler
Confidential – Oracle Internal/Restricted/Highly Restricted 92
Other known JDK modules
93. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Summary
• Value
– System reaches peak performance quicker ★
– Reduced total footprint of multiple JVMs running same code ★
– Native code performance on platforms that do not allow JIT ★
• Risks
– Still experimental, not officially supported
– No official documentation (besides the JEP)
– Only available on AMD64 Linux
– Does not support invokedynamic (JSR 292) or custom classloaders
94. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Summary
• Value
– System reaches peak performance quicker ★
– Reduced total footprint of multiple JVMs running same code ★
– Native code performance on platforms that do not allow JIT ★
• Risks
– Still experimental, not officially supported
– No official documentation (besides the JEP)
– Only available on AMD64 Linux
– Does not support invokedynamic (JSR 292) or custom classloaders
★ YMMV
95. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Other AoT Sessions at J1
• HotSpot AOT Internals and AOT + CDS Performance Results [CON7772]
– Thursday, Oct 05, 11:00 a.m. - 11:45 a.m. | Marriott Marquis (Yerba Buena Level) -
Salon 12
– JVMLS version of talk: https://www.youtube.com/watch?v=n5DCg6M2MDM
• JIT Versus AOT: Unity and Conflict of Dynamic and Static Compilers for Java
[CON3230]
– Thursday, Oct 05, 1:00 p.m. - 1:45 p.m. | Marriott Marquis (Yerba Buena Level) - Salon
14
Confidential – Oracle Internal/Restricted/Highly Restricted 95
96. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
References
• JEP 295: Ahead-of-Time Compilation
http://openjdk.java.net/jeps/295
• Tiered Compilation
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/performance-enhancements-7.html#tieredcompilation
• Class Data Sharing
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/class-data-sharing.html
• JEP draft: Application Class Data Sharing
http://openjdk.java.net/jeps/8185996
• Ahead Of Time (AOT) Internals with Vladimir Kozlov and Igor Veresov
https://www.youtube.com/watch?v=n5DCg6M2MDM
Confidential – Oracle Internal/Restricted/Highly Restricted 96
97. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Stay connected
• Join us: DevOps Corner (Developer Lounge – Moscone West)
• Learn more: openjdk.java.net | wercker.com/java
• Follow: @OpenJDK, @wercker #JavaOne #DevOps
97
98. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding 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.
Confidential – Oracle Internal/Restricted/Highly Restricted 98