Loading topic
java and javac from a terminal. It also assumes you know that javac produces bytecode and that the JVM executes it. The previous chapter covered the bytecode interpreter. Here we ask why HotSpot does not stay with it, and why it compiles at 5 min readjava from a terminal. It also assumes you know that Java source compiles to bytecode, and that HotSpot first runs that bytecode in an interpreter. The previous chapters covered why HotSpot compiles hot code at run time. This chapter covers the t5 min readjava from the command line and know the idea of a bytecode interpreter. It also assumes you know that HotSpot compiles some methods to native code while the program runs. Here we cover the mechanism that picks which methods get compiled and when.5 min readjava with -XX flags. You do not need to know tiered compilation levels in detail yet. Here, a "tier" only means a compil6 min readjava from a shell. Here you will learn to read the output of -XX:+PrintCompilation, the si5 min read-XX:+PrintCompilation output. Here you will learn what the JVM records about your program, where it records it, and how later chapters use it for i6 min readjava from the command line, and have read the earlier chapters on tiered compilation and profiling. You should know that C1 and C2 compile hot methods and that the JVM collects profile data (call sites, receiver types, branch counts) while code run6 min read-XX:+PrintCompilation output.5 min readjava from a terminal. It also assumes you know the tier model from earlier chapters: the interpreter is level 0, C1 produces levels 1 to 3, and C2 produces level 4. Here we turn that model into a working set of flags. Some flags show what the JIT is doing. Others c5 min read-XX:+PrintCompilation, and deoptimization from earlier chapters. It applies them to one practical problem: measuring Java code without fooling yourself.7 min read-XX:+PrintCompilation output. It covers two experimental features that JDK 11 added to HotSpot. One is ahead-of-time (AOT) compilation with `jao5 min read