How the HotSpot and Graal JVMs execute Java code

Click for: original source

James Gough explores the subsystems that are involved in interpreting, compiling and executing a Hello World Application. He dives into JIT compilation and the arrival of the JVM Compiler Interface to explore how optimizations are applied to boost the performance. He discusses HotSpot, explores Graal and the JVM ecosystem to discover performance benefits of a platform 25 years in the making.

This talk can be divided into few interesting topics:

  • Exploring the JVM
  • Building Java applications, a simple example
  • Classloaders
  • Interpreting bytecode
  • The HotSpot compiler
  • Challenges with the C2 compiler
  • Evolving the JIT compiler
  • JVM Compiler Interface (JVMCI)
  • Graal as a JIT

… and much more. You will also get a video with the talk.

Fundamentally, Graal in terms of how JIT compilation is working, it’s not doing anything super revolutionary like the structure. the idea that you take a graph that represents your program as it is running. Then you do optimizations to that graph, essentially. Then you take the output graph and emit that into the actual machine code itself. It uses a combination of, what’s actually going on? What does the profile look like? It runs through a series of phases. Then you end up with your output code, which is a lot quicker than being interpreted. Superb!

[Read More]

Tags java app-development programming miscellaneous performance