OpenJDK NMethod Entry Barriers

An nmethod, which I&rsquo;ll refer to as NMethod, is HotSpot&rsquo;s representation of a natively compiled Java method, the result of a JIT compilation, typically produced by the C1 or C2 compilers. NMethods are interesting because they require cooperation from the Garbage Collector (GC) to execute efficiently while fitting into Java&rsquo;s automatic memory management model. &#xA; In this post,…