Unpick performance mysteries benchmarking GraalVM native executables

Day 1 | 18:00 | 00:25 | UD2.208 (Decroly) | Galder Zamarreño


Note: I'm reworking this at the moment, some things won't work.

The stream isn't available yet! Check back at 18:00.

Java code that is ahead-of-time (AOT) compiled using GraalVM Community Edition native-image may run more slowly than code that is just-in-time (JIT) compiled with the HotSpot compiler. This is something I quickly discovered when I joined the GraalVM team at Red Hat.

Diagnosing performance issues in Java code can be done using Java Microbenchmark Harness (JMH), which helps developers build, run and analyse microbenchmarks written in Java. However, it only works with Java virtual machines using JIT compilation. For the past four years I’ve been wondering how to make JMH achieve the same objectives when that Java code runs as GraalVM native executables.

Eventually I solved this problem creating an extension to JMH that allows Java developers to seamlessly run their existing JMH benchmarks as GraalVM native executables. In this talk I will demonstrate how to obtain benchmark results, gather performance statistics and inspect annotated assembly code. Finally I will compare how the GraalVM native-image AOT code differs from the JIT code of HotSpot.