What is Hotspot VM & in-depth understanding of Java virtual machines

Source: Internet
Author: User

Reference http://book.2cto.com/201306/25434.html

In addition, this article is derived from a series: "In-depth understanding of Java Virtual machines: JVM advanced Features and Best Practices (2nd Edition)" http: // book.2cto.com/201306/25426.html The book has been downloaded (more than 60 m.. )/users/baidu/documents/data/interview/java

HotSpot

With the hotspot VM, it is believed that all Java programmers know that it is a virtual machine in the Sun JDK and OPENJDK, and is currently the most widely used Java virtual machine.
But not everyone knows that this seemingly "pedigree" virtual machine was originally not developed by Sun, but was designed by a small company called "Longview Technologies";
Even though the virtual machine was not originally developed for the Java language, it originated from the Strongtalk VM,
Quite a lot of the technology in this virtual machine comes from a support self language implementation "up to C language 50%Above the execution efficiency of the target of the designed virtual machine,
Sun noted that the virtual machine had many excellent ideas and practical effects on JIT compiling, and acquired the Longview Technologies Company in 1997, thus acquiring a hotspot VM. The HotSpot VM inherits the benefits of Sun's two commercial virtual machines (such as the exact memory management mentioned earlier) and has many of its own new technical advantages,
As the hotspot in its name refers to its hotspot code detection technology (in fact, two VMs are basically the same period of independent products, the hotspot is a little earlier, the hotspot is the first accurate GC,
The exact VM also has a hotspot probe that is almost the same as the hotspot.
There has been a debate within sun about the exact VM and hotspot VM which became Sun's primary support, and the hotspot's defeat of exact was not a technical triumph.
Hotspot code detection capabilities for hotspot VMs can be performed by executing counters to find the code with the most compiled value, and then notifying the JIT compiler to compile in a method.
If a method is called frequently, or if the method has many valid loops, it will trigger the standard compilation and the OSR (stack substitution) compilation action, respectively.
The compiler and interpreter work properly together to strike a balance between optimized program response times and optimal execution performance without waiting for local code output to execute the program.
The time pressure for instant compilation is also relatively low, which helps introduce more code optimization techniques and output higher-quality native code. At the JavaOne conference in 2006, Sun announced that it would eventually open up Java, and in the following year, the various parts of the JDK, including, of course, the hotspot VM, were exposed under the GPL,
On this basis, the OPENJDK is established. In this way, the HotSpot VM becomes a common virtual machine for the Sun JDK and openjdk two of extremely close JDK projects. In 2008 and 2009, Oracle acquired Bea and Sun, respectively, so Oracle has two outstanding Java Virtual machines: JRockit VMS and hotspot VMs.
Oracle announces that the integration of these two virtual machines will complement each other in the near future (approximately when the JDK 8 is released).
The integration approach is largely based on the hotspot, porting JRockit's excellent features, such as using JRockit's garbage collector and Missioncontrol services,
Use the hotspot's JIT compiler with a hybrid runtime system.

What is Hotspot VM & in-depth understanding of Java virtual machines

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.