Skip to content

Latest commit

 

History

History
 
 

aot

Overview

Ahead Of Time (AOT) compilation is the act of compiling a programming language, or some intermediate representation such as bytecode, into native code so that input language can be natively executed1. This is different from Just In Time (JIT) compilation, where a JIT compiler, usually a component of some Virtual Machine (VM), will produce native code from some input source code while the VM is interpreting the same input. Applying AOT to interpreted languages such as Java can be done using a static approach; the AOT compiler will generate code given some input set of classes. Therefore, this kind of AOT can be called Static AOT; OpenJ9, however, uses Dynamic AOT.

Dynamic AOT is essentially a hybrid between Static AOT and JIT. The compiler does not generate native code prior to executing Java code but rather while the VM interprets Java code. Thus, the process of performing an AOT compilation is identical to a JIT compilation. However, when performing an AOT compilation, the compiler will also generate validation and relocation information. The code and data is then stored into the Shared Classes Cache (SCC). In a different JVM instance, the code is also loaded on demand; when the time comes to perform a JIT compilation, the compiler checks whether code for the method already exists in the SCC and loads that instead.

Topics

  1. Feature Documentation
  2. Introduction to AOT
  3. AOT: Relocation
  4. AOT: Validation
  5. Relocation Records
  6. Class Chains
  7. Symbol Validation Manager
  8. Inlined Methods
  9. Adding New Relocation Records
  10. Diagnostics

  1. https://en.wikipedia.org/wiki/Ahead-of-time_compilation