HotSpot (virtual machine)
| Company type | Software |
|---|---|
| Industry | Software development |
| Predecessor | Strongtalk system by Longview Technologies (Animorphic) |
| Founded | April 27, 1999 |
| Founder | Sun Microsystems |
| Fate | Acquired by Oracle Corporation in 2010 |
| Successor | None |
Area served | Worldwide |
Key people | Clifford Click (lead of HotSpot server compiler development) |
| Products | Java Virtual Machine (JVM) |
| Owner | Oracle Corporation |
| Parent | Oracle Corporation |
HotSpot, also known as the Java HotSpot Performance Engine, is a Java virtual machine designed for both desktop and server environments. Initially created by Sun Microsystems and subsequently maintained by Oracle Corporation following its acquisition in 2010, HotSpot boosts execution efficiency through methods such as just-in-time compilation and adaptive optimization. It stands as the primary Java Virtual Machine and serves as the official reference implementation of the Java programming language.
History
The Java HotSpot Performance Engine was introduced on April 27, 1999, building upon innovations from the Smalltalk-based Strongtalk system developed by Longview Technologies (Animorphic). This virtual machine has its origins in the Self VM, substituting its straightforward but rapid compiler with an interpreter. After Sun discontinued the Self initiative, key contributors Urs Hölzle and Lars Bak established Longview. Sun acquired Animorphic in 1997.
Post-acquisition, Sun engineered a sophisticated just-in-time (JIT) compiler for Java, known internally as the HotSpot server compiler or C2, under the leadership of Clifford Click. This effort extended his doctoral work on compiler optimizations. The term HotSpot reflects the JVM’s strategy of dynamically detecting frequently executed "hot spots" within bytecode to optimize these sections for enhanced performance while limiting overhead elsewhere. In certain performance tests, HotSpot even outperformed comparable C++ or C programs.
Initially offered as an optional component for Java 1.2, HotSpot became the standard Sun JVM starting with Java 1.3.
Features
The JRE, originally from Sun and now under Oracle, includes two distinct virtual machines: Client and Server. The Client VM prioritizes rapid startup through interpretation, whereas the Server VM emphasizes higher performance with longer load times by employing optimized JIT compilation. Both VMs compile frequently used methods once they surpass a configurable invocation count.
Starting with Java 7, tiered compilation was introduced to merge client and server compilers, aiming to reduce startup delay while preserving optimal runtime performance. From Java 8 onward, tiered compilation is enabled by default on the server VM.
HotSpot is implemented in C++ and Assembly language and contained approximately 250,000 lines of code as of 2007. Its components include:
- A Java class loader
- A template-based Java bytecode interpreter
- Two JIT compilers: Client (C1) and Server (C2), each optimized for specific scenarios
- A variety of garbage collectors, such as low-latency ZGC and low-pause Shenandoah
- Supporting runtime libraries
- Features enhancing serviceability
JVM flags
HotSpot provides a wide array of command-line arguments to configure VM behavior. While some options are common among JVMs, others—identified by prefixes like -X or -XX—are unique to HotSpot and may not be supported in other JVM implementations.
License
On November 13, 2006, both the HotSpot JVM and the Java Development Kit (JDK) were released under the terms of the GNU General Public License (GPL) version 2. This licensing change coincided with their incorporation into Java SE 7.
Oracle-supported
HotSpot and the complete Java Development Kit (JDK) are officially maintained by Oracle Corporation for use on Windows, Linux, and macOS systems. The supported instruction set architectures include x86-64 and AArch64. Beginning with JDK 15, support for Solaris and the SPARC architecture has been phased out.
Community ports
There are community-developed ports available for a variety of other Unix operating systems, which support architectures such as x86, PowerPC, and SPARC (limited to Solaris). Due to HotSpot’s heavy reliance on assembly language, porting it can be quite complex, even though some components are implemented in ISO-compliant C++.
To overcome these challenges, the IcedTea project created a generic HotSpot interpreter port known as zero-assembler Hotspot (or simply zero), which significantly reduces the need for assembly code. This approach enables easier adaptation of HotSpot’s interpreter to any processor architecture running Linux. Since version 1.6, all non-x86 architecture ports—including PowerPC, Itanium (IA-64), S390, and ARM—have utilized zero-assembler Hotspot.
See also
- List of Java virtual machines
- Comparison of Java virtual machines
- Java performance
- OpenJDK
- Da Vinci Machine, a project aimed at extending the JVM to accommodate dynamic programming languages