0Pricing
Java Academy · Lesson

JIT Compilation and Tiered Compilation

Learn how the JVM interprets then JIT-compiles hot methods and how to trigger and observe compilation.

Interpreter vs JIT

The JVM initially interprets bytecode. When a method is called frequently ("hot"), the JIT compiler compiles it to native machine code for much faster execution.

Tiered Compilation (Default Since Java 8)

Tiered compilation uses five tiers: T0 (interpreter), T1 (C1 simple), T2 (C1 limited profiling), T3 (C1 full profiling), T4 (C2 fully optimized). Methods move up tiers as they get hotter.

// Enable/disable tiered compilation:
// -XX:+TieredCompilation   (default ON in Java 8+)
// -XX:-TieredCompilation   (disables — only C2 used)

All lessons in this course

  1. Class Loading Phases: Load, Link, Initialize
  2. ClassLoader Hierarchy and Custom Loaders
  3. Inspecting Bytecode with javap
  4. JIT Compilation and Tiered Compilation
← Back to Java Academy