Jump to content
Wikipedia The Free Encyclopedia

HotSpot

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Java virtual machine
This article is about Oracle's Java virtual machine. For other uses, see Hotspot.
This article's lead section may be too short to adequately summarize the key points. Please consider expanding the lead to provide an accessible overview of all important aspects of the article. (October 2018) (Learn how and when to remove this message)
Java HotSpot Virtual Machine
Original author Sun Microsystems
Developer Oracle Corporation
ReleaseApril27, 1999;27 years ago(1999年04月27日)[1]
Stable release
Java SE 26[2] Edit this on Wikidata / 17 March 2026;4 months ago(17 March 2026)
Written inC++, Assembly
Operating system Cross-platform
Type Java virtual machine
License Proprietary (early versions), GNU General Public License (current)
Websiteopenjdk.org/groups/hotspot/
Repository github.com/openjdk/jdk/tree/master/src/hotspot

HotSpot, released as Java HotSpot Performance Engine,[1] is a Java virtual machine for desktop and server computers, developed by Sun Microsystems which was purchased by and became a division of Oracle Corporation in 2010. Its features include improved performance via methods such as just-in-time compilation and adaptive optimization. It is the de facto reference Java Virtual Machine.

History

The Java HotSpot Performance Engine was released on April 27, 1999,[1] built on technologies from an implementation of the programming language Smalltalk named Strongtalk, originally developed by Longview Technologies, which traded as Animorphic. The Longview virtual machine was based on the Self 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 purchased Animorphic.[3]

Shortly after acquiring Animorphic, Sun decided to write a new stronger just-in-time (JIT) compiler for the Java virtual machine,[4] named HotSpot server compiler (internal name C2), which was initially developed by Clifford Click [5] and was an extension of his PhD thesis on optimizing compilers.[6] The compiler name HotSpot is derived from the software's behavior: as it runs Java bytecode, 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.[7]

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

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.[10] Starting in Java 8, tiered compilation is the default for the server VM.[11]

HotSpot is written in C++ and Assembly. In 2007, Sun estimated it comprised approximately 250,000 lines of source code.[12] Hotspot provides:

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).[16] [17] [18] [19]

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.[20] This is the code that became part of Java 7.[21]

Supported platforms

Maintained by Oracle

As with the entire Java Development Kit (JDK), HotSpot is supported by Oracle Corporation on Windows, Linux, and macOS. Supported instruction set architectures (ISAs) are x86-64 and AArch64.[22] Since JDK 15, Solaris and SPARC are no longer supported.[23]

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, as much of it is almost extensively written in assembly language,[24] 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 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.[25] [26] [27]

See also

References

  1. 1 2 3 "Sun Announces Availability of the Java HotSpot Performance Engine". Press Release. Sun Microsystems. Archived from the original on 1 November 2013. Retrieved 26 March 2013.
  2. "JDK 26".
  3. Services, Chronicle Staff and News (1997年02月19日). "SUN MICRO BUYS LONGVIEW". SFGATE. Retrieved 2020年11月05日.
  4. "Cliff Click on Azul's Pauseless GC, Zing, JVM Languages". InfoQ. 2011年01月20日. Retrieved 2016年05月10日. [...] Anamorphic was acquired by Sun so the original team was at a company called Anamorphic, they came in with a technology that was targeted at Smalltalk and they re-targeted it for Java and they hired me shortly afterwards to do a new JIT for their virtual machine.
  5. Click, Clifford (April 2001). "The java hotspotTM server compiler". JVM'01: Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium. 1: 1.
  6. "Cliff Click — The Sea of Nodes and the HotSpot JIT". February 14, 2020 via YouTube.
  7. Lewis, J. P. (2004). "Performance of Java versus C++". Archived from the original on 2020年04月24日. Retrieved 2007年10月03日.
  8. Shankland, Stephen (18 February 1999). "HotSpot finally makes its mark". Cnet .
  9. "Sun Microsystems releases fastest client-side Java platform to date". Sun Microsystems. 2000年05月08日. Retrieved 2007年10月03日.
  10. "Java TM HotSpot Virtual Machine Performance Enhancements". docs.oracle.com.
  11. "Java TM HotSpot Virtual Machine Performance Enhancements". docs.oracle.com.
  12. "The HotSpot Group". Sun Microsystems. 2007. Retrieved 2007年10月03日. There are nearly 1500 C/C++ header and source files, comprising almost 250,000 lines of code
  13. "Main - ZGC". OpenJDK Wiki.
  14. "HotSpot Virtual Machine Garbage Collection Tuning Guide". Oracle Help Center.
  15. "Main - Shenandoah". OpenJDK Wiki.
  16. "The java Command". Oracle Corporation . Retrieved 2025年03月21日.
  17. Mocker, Joseph D. (2007年08月28日). "A Collection of JVM Options". Archived from the original on 2011年04月30日. Retrieved 2009年02月08日.
  18. Maximovich, Dmitri. "The most complete list of -XX options for Java 6 JVM". Archived from the original on 2010年01月30日. Retrieved 2009年02月08日.
  19. Nutter, Charles (2009年01月29日). "My Favorite Hotspot JVM Flags" . Retrieved 2009年02月08日.
  20. "Sun Open Sources Java Technology and Releases Source Code Under GPL Version Two License Via NetBeans and Java.net Communities". Sun Microsystems. 2006年11月13日. Archived from the original on 2009年02月09日. Retrieved 2017年05月06日.
  21. JDK7 Archived 2016年12月15日 at the Wayback Machine , Sun.
  22. "Oracle JDK 17 Certified System Configurations". Oracle Corporation . Retrieved 2021年02月01日.
  23. "JEP 381: Remove the Solaris and SPARC Ports". openjdk.java.net.
  24. Benson, Gary (2007年11月06日). "Gary's guide to porting IcedTea" . Retrieved 2008年01月26日.{{cite web}}: CS1 maint: deprecated archival service (link)
  25. Benson, Gary (2008年02月01日). "1st February 2008" . Retrieved 2008年02月03日.{{cite web}}: CS1 maint: deprecated archival service (link)
  26. Haley, Andrew (2008年01月31日). "Making zero-assembler the default on ppc" . Retrieved 2022年02月01日.
  27. Angel, Lilian (2008年02月13日). "IcedTea 1.6 Released with Zero-assembler and JNLP support!". Red Hat . Retrieved 2008年02月13日.

AltStyle によって変換されたページ (->オリジナル) /