← 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 68
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. C2 can optimise using profile assumptions protected by guards, or registered dependencies checked when the runtime changes. Deoptimisation preserves Java behavior when an assumption fails. Recorded trap history can change later compilation decisions. A bounded burst that decays under continued representative traffic can be normal; 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. Reuse supplied logs, workload history and prior checks. Establish the affected startup or steady-state service criterion, recovery authority and capture budget; ask only for missing facts that would change the next action. 2. **Collect the reason, the a