Jvm JIT and Hotspot - What are the Differences

I have heard that these terms are used, but I cannot find a top-level view of where they fit together in the Java framework. I know that JIT is a compilation mechanism, but is it part of the JVM? What is a hot spot? Is this some kind of new type of VM?

+4
source share
3 answers

JVM is a specification. Specifications are sold by different suppliers. For example: Sun (now Oracle), IBM, BEA (now Oracle), SAP implement the specification and provide their own JVMs. A special implementation of Sun is called Hotspot. BEA is called JRockit.

JIT is a part of the JVM that accepts Java bytecodes and compiles it into its own processor assembly code on the computer on which the program is running. Each vendor implements JIT using unique sophisticated algorithms. For example, JIT on JRockit is different from JIT on Hotspot.

+7
source

JIT is a "Just In Time" compilation, mostly on-the-fly compilation.

Hotspot is a concept inside the JVM where it only compiles the code used. That is, the hot snippets of code are used over and over again.

The JVM keeps track of usage, and when something becomes popular enough, it queues this code for compilation, continuing to interpret the code.

When the JIT ends, it swaps the interpreted bits with the compiled bits.

This is why the JVM needs to β€œwarm up” for benchmarking, etc.

The -server and -client options for the Sun / Oracle JVM affect this behavior with respect to how aggressive they are when performing JIT work.

+10
source

HotSpot is the name of a specific JVM . It has a JIT compiler, like most JVMs today, but does the JVM have one of them (a fairly widescreen, openly advertised and important, but still) implementation detail. There were Java implementations without a JIT compiler, and they were the same standard compilers.

A β€œhot spot” is also part of the code, which is often called or takes a disproportionate amount of time to execute (which is probably due to the fact that the JVM got its name, as it, like many JITs, is designed to speed up hot spots "in particular).

+6
source

All Articles