Supriya Ghosh (Editor)

HotSpot

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Written in
  
C++

Type
  
Java virtual machine

Operating system
  
Cross-platform

Developer(s)
  
Oracle Corporation (formerly Sun Microsystems)

Initial release
  
April 27, 1999; 17 years ago (1999-04-27)

Stable release
  
23.25-b01 / January 1, 2016; 14 months ago (2016-01-01)

HotSpot, released as Java HotSpot Performance Engine, is a Java virtual machine for desktop and server computers, maintained and distributed by Oracle Corporation. It features improved performance via methods such as just-in-time compilation and adaptive optimization.

Contents

History

The Java HotSpot Performance Engine, first released April 27, 1999, built on technologies from an implementation of the programming language Smalltalk named Strongtalk, originally developed by Longview Technologies, which traded as Animorphic. A Sun research project, the language Self, had earlier successfully used Animorphic's virtual-machine technology. In 1997, Sun Microsystems purchased Animorphic.

Shortly after acquiring Animorphic, Sun decided to write a new just-in-time (JIT) compiler for the Java virtual machine. This new compiler would give rise to the name HotSpot, derived from the software's behavior: as it runs Java bytecode, it continually analyzes the program's performance for hot spots which are executed often or repeatedly. These are then targeted for optimizing, leading to high-performance execution with a minimum of overhead for less performance-critical code. In one report, the JVM beat some C++ or C code in some benchmarks.

Initially available as an add-on for Java 1.2, HotSpot became the default Sun JVM in Java 1.3.

Features

Sun's JRE features two virtual machines, one called Client and the other Server. The Client version is tuned for quick loading. It makes use of interpretation. The Server version loads more slowly, putting more effort into producing highly optimized JIT compilations, that yield higher performance. Both VMs compile only often-run methods, using a configurable invocation-count threshold to decide which methods to compile.

Tiered compiling, an option introduced in Java 7, uses both the client and server compilers in tandem to provide faster startup time than the server compiler, but similar or better peak performance. Starting in Java 8, tiered compilation is the default for the server VM.

HotSpot is written in C++. The source code contains approximately 250,000 lines of code. Hotspot provides:

  • A Java Classloader
  • A Java bytecode interpreter
  • Client and Server virtual machines, optimized for their respective uses
  • Several garbage collectors
  • A set of supporting runtime libraries
  • JVM flags

    HotSpot supports many command-line arguments for options of the virtual machine execution. Some are standard and must be found in any conforming Java virtual machine, others are specific to HotSpot and may not be found in other JVMs (options that begin with -X or -XX are non-standard).

    License

    On 13 November 2006, the HotSpot JVM and the Java Development Kit (JDK) were licensed under the GNU General Public License (GPL) version 2. This is the code that became part of Java 7.).

    Maintained by Oracle

    As for the whole Java Development Kit (JDK), HotSpot is supported by Oracle Corporation on Windows, Linux, macOS, and Solaris. Supported instruction set architectures (ISAs) are IA-32, x86-64, ARMv6, ARMv7, and SPARC (Solaris only).

    Ports by third parties

    Ports are also available by third parties for various other Unix operating systems. Several different hardware architectures are supported, including x86, PowerPC, and SPARC (Solaris only).

    Porting HotSpot is difficult because the code, while written in mostly C++, contains much assembly language. To remedy this, the IcedTea project has developed a generic port of the HotSpot interpreter called zero-assembler Hotspot (or zero), with almost no assembly code. This port is intended for easy adaptation of the interpreter component of HotSpot to any Linux processor architecture. The code of zero-assembler Hotspot is used for all the non-x86 architecture ports of HotSpot (PowerPC, Itanium (IA-64), S390 and ARM) since version 1.6.

    References

    HotSpot Wikipedia