← ClaudeAtlas

c2-sea-of-nodeslisted

How HotSpot actually executes and compiles: the runtime-generated template interpreter, C2's sea-of-nodes IR, a release-scoped diagnostic map of compilation phases, and why a given transformation fired or did not. Use when a method is believed to be "not optimised", when an allocation that looks eliminable still shows up in allocation profiling, when a hot call site reports `too large` or stays non-inlined, when `made not entrant` repeats on the same method, when someone prescribes `-XX:CompileThreshold` under tiered compilation, or when explaining why the JIT did not fix an O(n^2) loop. Does not cover the tiered pipeline, warm-up and code cache sizing (jit-compilation), reading the compiler's own decision logs end to end (compilation-and-inlining-logs), the emitted machine code (reading-jit-assembly), or the bytecode the compiler consumes (jvm-bytecode).
robsonkades/agent-skills · ★ 2 · Data & Documents · score 75
Install: claude install-skill robsonkades/agent-skills
# C2 and the Sea-of-Nodes IR ## Purpose Decide _why_ a compilation came out the way it did, from the mechanism rather than from folklore. The failure this prevents is the confident non-fix: a runbook that sets `-XX:CompileThreshold` under tiered compilation and changes nothing at all, or a refactoring done because "the JIT will optimise it" when the JIT never performs algorithmic changes. Start with tier/version, call-site inlining and escape state, then follow the failing transformation: type/profile stability, alias/memory dependencies, loop/range checks, vectorization, macro expansion, matching, scheduling and register pressure can each own the result. The phase model routes evidence; it is not a three-question completeness claim. ## Workflow The authoring baseline is HotSpot C2 on JDK 25 (reference measurements use Temurin 25.0.3); these are implementation details, not Java language guarantees. Before running recipes, inspect the project's toolchain, CI/runtime image and actual `java -version`, including vendor/update, product versus debug build, compiler and effective flags. Level 4 can be JVMCI rather than C2; route that compiler's internals to `graalvm-jit`. Do not upgrade the target runtime or enable preview features to match this baseline. For another release, check `java -Xlog:help` and flag availability first; unavailable diagnostics require an alternative evidence source, not an assumed result. 1. **Establish the compilation history before anything else.** R