Reading Jit Assembly

Reading the machine code HotSpot actually emitted: installing hsdis, driving -XX:+PrintAssembly and JMH perfasm, telling the verified entry point and prologue from the method body, and confirming or refuting a hypothesis about an optimisation from the instructions themselves. Use when a claim about an optimisation needs proof at the instruction level, when PrintAssembly prints hex bytes instead of mnemonics, when PrintOptoAssembly on a product JDK unexpectedly prints only banner lines, when the capture must come from a running JVM, when a load has no cmp/test before it and someone concludes the null check was eliminated, when an assembly excerpt from a blog is in the other operand order, or when unexplained runtime calls appear between the expected logic. Does not cover the compiler phases that produced the code (c2-sea-of-nodes), what the compiler decided to inline or compile (compilation-and-inlining-logs), vectorisation as a subject (simd-and-vector-api), or benchmark construction (jmh-advanced).

robsonkades 1235d0c 5 files · 69.3 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/reading-jit-assembly commit 1235d0c915

Frequently asked questions

npx skillmds@latest add robsonkades/reading-jit-assembly