HotSpot, released as Java HotSpot Performance Engine,
is a
Java virtual machine
A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally descr ...
for
desktop and
server computers, developed by
Sun Microsystems
Sun Microsystems, Inc., often known as Sun for short, was an American technology company that existed from 1982 to 2010 which developed and sold computers, computer components, software, and information technology services. Sun contributed sig ...
which was purchased by and became a division of
Oracle Corporation
Oracle Corporation is an American Multinational corporation, multinational computer technology company headquartered in Austin, Texas. Co-founded in 1977 in Santa Clara, California, by Larry Ellison, who remains executive chairman, Oracle was ...
in 2010. Its features improved performance via methods such as
just-in-time compilation and
adaptive optimization. It is the de facto Java Virtual Machine, serving as the reference implementation of the
Java programming language
Java is a high-level, general-purpose, memory-safe, object-oriented programming language. It is intended to let programmers ''write once, run anywhere'' ( WORA), meaning that compiled Java code can run on all platforms that support Jav ...
.
History
The Java HotSpot Performance Engine was released on April 27, 1999,
built on technologies from an implementation of the programming language
Smalltalk
Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
named
Strongtalk, originally developed by Longview Technologies, which traded as Animorphic. The Longview virtual machine was based on the
Self
In philosophy, the self is an individual's own being, knowledge, and values, and the relationship between these attributes.
The first-person perspective distinguishes selfhood from personal identity. Whereas "identity" is (literally) same ...
virtual machine, with an interpreter replacing the fast-and-dumb first compiler. When Sun cancelled the Self project, two key people,
Urs Hölzle and
Lars Bak left Sun to start Longview. In 1997,
Sun Microsystems
Sun Microsystems, Inc., often known as Sun for short, was an American technology company that existed from 1982 to 2010 which developed and sold computers, computer components, software, and information technology services. Sun contributed sig ...
purchased Animorphic.
Shortly after acquiring Animorphic, Sun decided to write a new stronger
just-in-time (JIT) compiler for the Java virtual machine, named HotSpot server compiler (internal name C2), which was initially developed by Clifford Click and was an extension of his PhD thesis on optimizing compilers. The compiler name ''HotSpot'' is derived from the software's behavior: as it runs
Java bytecode
Java bytecode is the instruction set of the Java virtual machine (JVM), the language to which Java and other JVM-compatible source code is compiled. Each instruction is represented by a single byte, hence the name bytecode, making it a compact ...
, as with the Self VM, HotSpot 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
JRE (originally from Sun, now from Oracle) 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 to 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++ and Assembly. In 2007, Sun estimated it comprised approximately 250,000 lines of source code. Hotspot provides:
* A
Java class loader
* A templating
Java bytecode
Java bytecode is the instruction set of the Java virtual machine (JVM), the language to which Java and other JVM-compatible source code is compiled. Each instruction is represented by a single byte, hence the name bytecode, making it a compact ...
interpreter
* ''Client'' (C1) and ''Server'' (C2) Just-in Time Compilers, optimized for their respective uses
* Several
garbage collectors (including the low-latency ZGC and low-pause-time Shenandoah)
* A set of supporting runtime libraries
* Serviceability features
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
A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally descr ...
; 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
The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
(GPL) version 2. This is the code that became part of
Java 7.
[JDK7](_blank)
, Sun.
Supported platforms
Maintained by Oracle
As with the entire
Java Development Kit (JDK), HotSpot is supported by
Oracle Corporation
Oracle Corporation is an American Multinational corporation, multinational computer technology company headquartered in Austin, Texas. Co-founded in 1977 in Santa Clara, California, by Larry Ellison, who remains executive chairman, Oracle was ...
on
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, and
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
. Supported
instruction set
In computer science, an instruction set architecture (ISA) is an abstract model that generally defines how software controls the CPU in a computer or a family of computers. A device or program that executes instructions described by that ISA, s ...
architectures (ISAs) are
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
and
AArch64
AArch64, also known as ARM64, is a 64-bit version of the ARM architecture family, a widely used set of computer processor designs. It was introduced in 2011 with the ARMv8 architecture and later became part of the ARMv9 series. AArch64 allows ...
. Since JDK 15,
Solaris and
SPARC are no longer supported.
Ports by third parties
Ports are also available by third parties for various other
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s. Several different hardware architectures are supported, including x86,
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
, and SPARC (Solaris only).
Porting HotSpot is difficult, as much of it is almost extensively written in
assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
, though several sections of it are also written in purely
standards conformant ISO C++. 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
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
processor architecture. The code of ''zero-assembler Hotspot'' is used for all the non-
x86 architecture ports of HotSpot (
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
,
Itanium (
IA-64),
S390 and
ARM) since version 1.6.
See also
*
List of Java virtual machines
*
Comparison of Java virtual machines
*
Java performance
*
OpenJDK
*
Da Vinci Machine, a project to prototype the extension of the JVM to add support for
dynamic programming language
A dynamic programming language is a type of programming language that allows various operations to be determined and executed at runtime. This is different from the compilation phase. Key decisions about variables, method calls, or data types are ...
s
References
External links
*
A list of HotSpot VMOptionsThe Java Virtual Machine Specification*
HotSpot Mercurial source code development repository (version control system) for JDK8
{{DEFAULTSORT:Hotspot
Assembly language software
Free software programmed in C++
Java virtual machine
Oracle software
Sun Microsystems software