← ClaudeAtlas

deoptimizationlisted

Deoptimisation and recompilation on HotSpot: uncommon traps and their reason codes, the none / maybe_recompile / reinterpret / make_not_entrant / make_not_compilable actions, jdk.Deoptimization in JFR, -XX:+TraceDeoptimization, the per-method trap limits and recompilation cutoffs, and diagnosing a method that never stabilises. Use when a method repeatedly shows "made not entrant" in the compilation log, when latency spikes correlate with class loading or a deploy, when a burst of "marked for deoptimization" follows a deploy or a plugin load, when a feature flag or APM agent is suspected of invalidating compiled code, when "made not compilable" or a flood of action "none" appears for a hot method, when someone proposes raising PerMethodRecompilationCutoff, or when -Xlog:jit+deoptimization produced an empty file. Does not cover the tiered pipeline and warm-up (jit-compilation), reading the compilation log itself (compilation-and-inlining-logs), or C2's internal representation (c2-sea-of-nodes).
robsonkades/agent-skills · ★ 2 · Code & Development · score 75
Install: claude install-skill robsonkades/agent-skills
# Deoptimization ## Purpose Decide whether a deoptimisation is the JIT working correctly or a method that will never reach stable optimised code. Speculation is what makes C2 fast: it bets on a profiled assumption, embeds a check, and unwinds without ever producing a wrong result when the bet fails. The trap is recorded in method profiling data and can change later compilation decisions. A bounded burst that decays after recompilation is the design working; continued events at the same site require diagnosis rather than an assumption that all deoptimisation is benign. The failure this prevents is both directions of the same mistake — alerting on every `jdk.Deoptimization` event until the alert is ignored, and raising a recompilation cutoff so the JVM takes longer to give up on a method whose underlying assumption keeps changing. ## Workflow 1. **Establish whether the question is one method or a post-deploy pattern**, and fix a reference window (a deploy, a config change, a library or plugin rollout) to correlate against. Inspect the deployed vendor/build, compiler mode and flags alongside project toolchains; JDK 25 observations are not authorization to upgrade the target or enable flags. 2. **Collect the reason, the action and the compile id**, not just the fact. JFR `jdk.Deoptimization` (enabled in the baseline `default.jfc`; stacks enabled by `profile.jfc` or explicit event settings) for production, `-Xlog:deoptimization=debug` for a session. Both see