Jit Inlining And Escape Analysis

Inlining and escape analysis in C2: inlining as the multiplier, scalar replacement versus "stack allocation", flow-insensitivity, turning a PrintInlining verdict into a code change, and measuring with gc.alloc.rate.norm. Use when allocation rate is high on a hot path, when a hot call is refused inlining and the fix is unclear, when an object pool for small objects, @ForceInline on application code or a higher FreqInlineSize is proposed, when an interface gains a third implementation on a critical path, when "the JIT will handle it" or "allocation is expensive" is asserted without a measurement, when a rare branch makes an object escape, when Optional, a stream or a lambda capture is blamed or excused for allocation, or when a hot method never appears in PrintCompilation. Does not cover warm-up and the tiered pipeline (jit-compilation), benchmark construction (jmh-microbenchmarks) or GC cost (gc-fundamentals). The algorithm itself is escape-analysis-internals; byte attribution is allocation-profiling.

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/jit-inlining-and-escape-analysis commit 39a46c2af9

Frequently asked questions

npx skillmds@latest add robsonkades/jit-inlining-and-escape-analysis