Language Runtimes · Cluster
JIT Compilation
Profiling, tiering, and speculative optimization.
- 01 Interpreter Dispatch Overhead and the Cost That Justifies Compilation Why a bytecode interpreter spends most of its cycles on dispatch rather than on the program, and how that per-instruction cost sets the break-even point for compiling code at run time.
- 02 Hot Code Detection with Invocation and Back-Edge Counters How runtimes decide that a function or loop is worth compiling, why method entries and loop back edges need separate counters, and what the counter arithmetic gets wrong.
- 03 Tiered Compilation and On-Stack Replacement Why runtimes compile the same method more than once, how a frame in the middle of an interpreted loop moves into optimized code, and what the transfer must reconstruct.
- 04 Type Feedback and Inline Caches in Dynamic Call Sites How a runtime records which types actually reach a polymorphic operation, how an inline cache turns that history into a few comparisons, and why monomorphic feedback changes what the compiler can generate.
- 05 Speculative Inlining and Guard Placement How an optimizing JIT inlines a callee it cannot prove is the right target, what the guard costs, and why the number of guards rather than the amount of inlining sets the limit.
- 06 Deoptimization and Frame State Reconstruction What must be rebuilt when compiled code abandons a speculative assumption, how the compiler describes frame state at each guard, and why the metadata is the expensive part of the mechanism.
- 07 Compilation Budgets and Recompilation Policy How a runtime bounds the CPU it spends compiling, what triggers a second compilation of code that already compiled, and why unbounded recompilation is a denial-of-service on the application itself.
- 08 Code Cache Management and Invalidation How generated code and its metadata are stored, why stale code must be retired rather than deleted, and how a runtime finds every compiled method that depended on a class it can no longer trust.
- 09 Sample-Based Profiling and Stack Walking in Compiled Code How a runtime learns where time goes by interrupting threads rather than instrumenting them, what a walk over compiled frames must decode, and why sampled profiles are biased in ways counters are not.
- 10 Escape Analysis and Scalar Replacement in Compiled Code How a JIT proves an allocation never leaves its method, why replacing an object with its fields is only safe while guards hold, and what makes the proof fail in practice.